Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [schema]

A schema of a database system is its structure described in a formal language supported by the database management system (DBMS) and refers to the organization of data to create a blueprint of how a database will be constructed (divided into database tables).

1
vote
0answers
26 views

Restrict postgresql's public schema's tables visibility in tableua

My requirement is to display only one particular table or materialised view when user give db_host, db_port, db_name, db_username, and db_password to tableau. Currently tableau is showing all the ...
0
votes
0answers
24 views

Multiple MySQL joins of possible properties in a 'flower' arrangement - acceptable design? (using Knex.js)

I have a functionality that has multiple (7+) potential properties to be added via a central 'hub' table. In most cases there will only be one property assigned, but it's possible the user will want ...
3
votes
0answers
45 views

Which data model/schema to apply to a timeseries datastore for data sources with varying fields

I'm asked to develop a data-storage for time-series data, yet despite significant research I'm unsure about the data model and storage technology to chose. About the data The source data which is ...
0
votes
1answer
27 views

FK relationships between schemas in azure SQL don't work

I'm having an issue with migrating my SQL 2014 database to an azure database. I'm able to get everything migrated except for any FK relationships between tables that aren't the in same schema. for ...
-1
votes
0answers
41 views

Database Design for Study Hall Reservation (with shared chairs) [on hold]

Suppose we have a study hall that we want to implement a reservation system for it. Users could reserve specific time-span as "fromDate" and "toDate" by a calendar. Every Valid selected time span ...
1
vote
2answers
75 views

SSMS does not open popup wizard to create a new schema

When I right click on 'schemas' and then on 'create new schema' my SSMS only opens the query editor but on every tutorial I saw a pop up wizard opens instead. How can I access this popup wizard? I can'...
0
votes
2answers
51 views

ORA-22285 Error while trying to register an xsd schema on oracle database

Here is the code for user "system" create or replace directory xml_mape as 'D:\app\Gusts\xml_mape'; GRANT READ,WRITE ON DIRECTORY xml_mape to lietotajs; Im trying to access the xsd file "dok1_shema....
0
votes
2answers
33 views

How to model very flexible referencing relationships between many tables?

I have various different entity types in my database. For purposes of example, consider an IMDB database: Movie Person Actor Director Translation and 20 more tables My application enables free-form ...
1
vote
2answers
37 views

database design for song position under play-list

I have a music streaming application where I have playlists. Each playlist has maximum 100 songs. I have a mapping table called PlaylistSongMapping which has the following schema +------+------------+...
0
votes
0answers
15 views

Postgres - Storing Attributes in 1:0 related object, performance improvements?

In my DB's central table, "Profiles," I want to collect activity statistics that will be updated often, although not all profiles will have statistics. The "Profiles" table is already heavily updated ...
0
votes
0answers
16 views

Saving records in MySQL that does not pre-exist

I have asked this question on SO but believe this is the right forum to ask, so here it is Let say, I have a pre-defined table called cities, with almost all the cities in my country. When a user ...
0
votes
2answers
28 views

How to model a relationship with different roles of users

I am creating a new project and currently modeling the relevant business domain. I am hesitating to choose one solution over another. Consider the following case. There is an order, the order has a ...
1
vote
0answers
22 views

help in designing a database for medical clinic keeping record of patient visit

I am making software for patients record keeping in a clinic . I have written a peewee model for setting up tables to store record of each patient visit and patient contact and a relative table that ...
0
votes
0answers
27 views

Set up table for relationship type with both users in a different visitor table

I am a newbie in database driven application, and I just started working on a web app for my brother and parents clinic to manage patient records. So for their clinic I have one table Visitor that ...
0
votes
1answer
40 views

Query to get all schemas in a database in PostgreSQL?

I'm not looking for the command \dn of psql, but instead of a query in SQL language that selects all schemas in a given database.
0
votes
0answers
26 views

Database design of beauty center

I'm planning a database to manage the reservations of a beauty center. I'm having some trouble creating his conceptual scheme. I have 4 customers, booking, beautician and room. customers can book a ...
1
vote
0answers
22 views

Interesting Database Designs for Product Catalogue including Recursive

I am doing some work for a client and they are creating a database of products of which I need to consume product data when it's created and updated to store in a third party service and then present ...
-1
votes
1answer
20 views

Creating blog fresh tables from old tables [closed]

I am re-creating a database structure from old tables. New tables should be optimized and easy to understand. In old database the developer used video table name for storing video blogs. However I ...
0
votes
1answer
55 views

Postgresql schema only works when wrapped in quotation marks

I'm seeing an odd behaviour - if I don't wrap my schema name in quotes, the server returns [42601] ERROR: syntax error at or near "." The query is simply: select count(*) from "authorization"....
2
votes
2answers
56 views

Is there an easy way to have a non-IDENTITY, auto incrementing column based on another column?

+----+-------------+-----------------+-------------+ | ID | ProductName | ProductCategory | ProductCode | +----+-------------+-----------------+-------------+ | 1 | Item 1 | 1 | ...
1
vote
0answers
32 views

Checking if schema name is included in every sentence

I got some oracle database scripts for creating the whole database of an application, including sentences for creating tables, sequences, synonyms, inserts and updates of data, etc I need to ensure ...
1
vote
0answers
9 views

How to store a multi-lingual “dictionnary” in a NoSQL database?

I hope this is the good Stack to ask this question, pardon me if it's not. I need to categorize images and need manipulate a lot of words. I'll explain what's bugging me first and then there is a ...
1
vote
0answers
91 views

Gaming shop database schema

I'm trying to design schema for my personal project that would be an online gaming shop. I would like to ask you guys for any suggestions/tips on how could I maybe improve my current draft. Concerns: ...
0
votes
1answer
33 views

Database schema tracking patient stats over time

I want to create a database which allows to record patient reading data points like: weight, height, pressure, etc., over time. I found a database schema like the one discussed in this Q & A ...
0
votes
0answers
47 views

Critique on my attempt at Normalizing MySQL database with Foreign Keys (Join on 8 Tables?)

edit: Here is my new derivative with the products id instead of MPN being the foreign key. Table #1: Products ╔════╦═════╦═══════╦════════════╦════════╦═════════════╦══════════════╗ ║ id ║ MPN ║ ...
-1
votes
1answer
49 views

How to copy data and schema from oracle to ms sql

Is there any easy way to copy data and schema from oracle to ms-sql. i am using sql server 2017 and oracle sql developer Version 4.1.4.21 I need one time migration. I am using SSMA but getting ...
0
votes
1answer
59 views

Designing MySQL Database For Two Different User Types (Staff and Client)?

I'm creating a web-app that will connect to a MySQL database. This app will have 2 users: a Staff and Client that can both log in from the same login page. Both Staff and Client share the following ...
2
votes
2answers
101 views

How can to make a new user see table in existing schema [closed]

I'm new into Oracle so this question might be dumb. I created new user and now I would like him to see table (or even better all tables by one command) in already existing schema (hr schema in this ...
1
vote
0answers
23 views

How do you aggregate the delta of values between two arbitrary datetime columns?

Please look at the columns and types of a table called History: - id PRIMARY KEY - account_id STRING - total_spent FLOAT - date_created DATETIME Sample data for this table: (id, account_id, ...
1
vote
1answer
26 views

MySQL Schema Change Management Tools? [closed]

I am a developer who has worked with SQL Server by way of Entity Framework, I am now using MySQL by way of Node.js I am stepping into your strange world to ask an operations question I hope you can ...
0
votes
0answers
21 views

How do I get a notification on schema changes in Sybase?

ALL, In SQL Server I can create a service_queue and then get notification about schema changes - CREATE, ALTER, DELETE TABLE or INDEX commands and then act accordingly in my C++ application. In ...
3
votes
2answers
61 views

Optimization of a query on a table that represents a weak entity type

I've been trying to figure this problem out for a while now, so I decided I'll try my luck here. I have a very complex online shop DB structure (multiple shops in one database, hundreds of thousands ...
3
votes
1answer
124 views

Normalizing/combing mutliple tables with similar data

I'm working on setting up a database of vehicle records based on data from a third party vendor. There are 3 models: Vehicles, Transmissions, and Adaptors. Both Vehicles and Transmissions are 1:n ...
0
votes
1answer
33 views

Advantages of a hierarchical schema for private chat

This post claims that All modern chatting interfaces, without exception, implement a hierarchical and a not-chronological schema for chat. It also links another post which gives an example ...
0
votes
0answers
28 views

How does an extended entity-relationship to relational mapping work in case of union type?

(This is not a homework question, this example is for my understanding) Consider the example shown in the diagram below: As I believe, Sponsor is a subclass of Club, Team and Dept, and an entity ...
1
vote
1answer
51 views

Soft-deleting change-tracked user content

To begin with, I distinguish between tables containing user-generated content and tables containing information about the user. The former are associated with the user profile, whereas the latter are ...
1
vote
1answer
31 views

Extended Entity-Relationship Diagram: Do the sub classes have foreign keys or primary keys?

Consider this example (they are disjoint, by the way): There are two scenarios which I am guessing: While translating it to relational tables, the rows in PROGRAMMER are unique which do not exist ...
2
votes
1answer
322 views

Could not complete cursor operation because the table schema changed after the cursor was declared

I get this error message occasionally when I execute a stored procedure that pulls information from multiple linked servers and aggregates the data. It looks similar to what I have below. DECLARE Cur ...
0
votes
0answers
32 views

Schema changes in transactional replication

I have a publisher (SQL Server cluster) in one box and the distributor/subscriber together is on the other box. I have a requirement by the vendor that if there is a new build (schema/database ...
0
votes
0answers
34 views

Hierarchy of objects in Postgres: What is contained directly within “databases” (excluding schema sub-items)?

I'm building a declarative system that lets me define my projects/databases/schemas/tables/fields etc in code, as well as the instances of projects on servers, and it handles schema changes and ORM ...
1
vote
1answer
34 views

How to handle a table schema with a new relationship subtype in an interviews scenario?

I have a table of "interviews" and "interview reviews" for both the interviewer and the interviewee. When the project was started there was only the need for one type of review, which is shown below ...
0
votes
3answers
184 views

Where to find the OID of a newly created Schema

I have created a new Schema in my Postgres db. I want to replace an OID in the pg_class table with the OID of the new Schema. But I don't know where to find the OID of the newly created Schema. Can ...
2
votes
1answer
40 views

Handling unique IDs on client side

Reading around on the topic hasn't got me closer to understanding best practices. I'm also relatively new and self-taught in programming, so might have some questions about how to actually execute the ...
1
vote
0answers
42 views

schema for product prices based on membership level

I need to model the following scenario: Customers have 3 options of annual memberships: [basic:$0,silver:$50,gold:$100] We have a supplier with product A at a cost of $30 per unit. (We will have ...
0
votes
1answer
78 views

Primary key and index column for Merge replication- Id vs GUID

I currently am revising the tables structure for a few geographically distributed databases- all tables currently have a UUID that is set as primary key. Merge subscription is currently (and in the ...
0
votes
2answers
55 views

read/write/execute to pl/sql grants [closed]

For a current task and future references, I am wondering how pl/sql grants (select, insert, update, delete, references, alter, index, all) are categorized from a read/write/execute or read/read-write/...
-2
votes
1answer
69 views

Database design for a timesheet app?

I'm designing the database schema for a time tracking application and I need a little piece of advice. The application must permit the user: To enter for each day of the week the amount of time he ...
2
votes
0answers
45 views

Surrogate foreign keys allow inconsistent data - which normal form does this violate?

We have inherited a system which has surrogate keys on every table (that is, an auto-increment primary key, id). All of the foreign key constraints are on individual surrogate keys, and this seems to ...
0
votes
1answer
25 views

Organizing and assigning privileges to multiple objects in MySQL

I'm new to MySQL, moving from MS SQL Server, and I'm wondering if there's a way to logically group tables, views, sp's, etc in the same manner as you would with schemas in SQL Server....seeing as how ...
1
vote
0answers
33 views

A flexible and robust schema for storing precomputed values/metrics

Background I'm dealing with a table that contains a lot of historical data. What I am doing is generating a bunch of metrics based on different combinations of column values and date periods (e.g. ...