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).

learn more… | top users | synonyms (1)

3
votes
0answers
80 views

Best design to reference multiple tables from single column?

Proposed schema First and foremost, here is an example of my proposed schema to reference throughout my post: Clothes ---------- ClothesID (PK) INT NOT NULL Name VARCHAR(50) NOT NULL Color ...
3
votes
0answers
197 views

Form builder schema for SQL database?

There are many ways one can envision the solution, from the top of my head: Two table approach: Field table with (name, field_name, type, description, meta) attributes Form table with (name, ...
3
votes
0answers
47 views

Possible SQLite bug?

I am running into an issue with SQLite that I think might be a bug. When I run the PRAGMA table_info command on a view that uses an aggregate function, the data type always comes up empty. To ...
3
votes
0answers
470 views

Oracle sqldeveloper Database Diff - not seeing indexes/sequences

I am using Oracle SQL Developer's database diff tool to compare schemas. (SQL developer version : 3.2.09) It works great on some environments, but in one, I can only see differences in tables - the ...
2
votes
0answers
86 views

Improving performance of a weighted search query in SQLite3

For an intra-site search I have this table in an SQLite3 database, that relates ids to search terms with a certain weight: CREATE TABLE search_index ( id INTEGER(7) REFERENCES other_table, ...
2
votes
0answers
112 views

Schema for user drag and drop ordering

I'm trying to work out the schema for a system where users will be able to order items in an (unlimited length) list by drag and drop. Is there any kind of standard way of storing this ordering ...
2
votes
0answers
108 views

Proper design of routes in Database MySQL

I'am trying to find out the best database design and try to stick with data integrity by using Foreign Keys. But I'm stuck right at the beginning because of limit relations between tables with FK to ...
2
votes
0answers
1k views

which role-permission database design?

I want to manage roles and permissions. Most of designs on web look like this tables: Users Roles UserRoles Permissions RolePermissions Here, what is permissions? I am thinking for such a design ...
1
vote
0answers
41 views

pg_restore slow after adding a check function

I have a postgres database with 10 schemas, and recently I had to find a way for some tables between schemas to have common records. The way I did this was to remove the foreign key on some tables in ...
1
vote
0answers
34 views

Handling Strong and Weak entity types in a one-to-one relationship

I am modelling a database for a term project and I have come across something I do not have a definite answer to. Diagram I was supplied with the following Entity-Relationship diagram: ...
1
vote
0answers
56 views

Database design in MySQL workbench

After doing some change As Mr Vérace told me here in this question, by changing the id names of each table into table_name_id and using the singular notation, I still need your opinion about this ...
1
vote
0answers
30 views

Manual postgres migration for Django (python) app

I have a Django (python) data model called Message: class Message(models.Model): text = models.CharField(max_length=50) sending_time = models.DateTimeField(auto_now_add=True) I added sender ...
1
vote
0answers
35 views

Design options for time series scientific data

I've been scratching my head over the last few days trying to find a solution that best suit my needs. I tried to think that what I want is probably not very different from what many others wanted ...
1
vote
0answers
18 views

UML database schema based on the creteria

I have the following requirements to design a database schema (brief): A Graphic Designer (we will call them designer) gets a call from a client with a new job to design a logo. The designer ...
1
vote
0answers
24 views

DATE - Normalization, a multiple ranged query, multiple inserts and multiple update

I have a booking system, airbnb style. TABLES -> prices, house, available_date A house has available days and not available days, but sometimes the days have different prices. A weekend is more ...
1
vote
0answers
58 views

SQLite reference table question

I'm using SQLite and Python for making a sensor network database. I have a table holding the nodes: NODE, another 2 tables for sensor specification: SENSOR_TYPE ("Temperature, Humidity...) and ...
1
vote
0answers
26 views

Possible to have duplicate fully qualified schema names with separate data in DB2 for z/OS?

We have several application teams that are looking to do a re-write of large legacy applications. This is mostly COBOL going against DB2 for z/OS (v11). The COBOL code was generated using a tool, so ...
1
vote
0answers
50 views

How to make a query from a database with schemas to a database without schemas, and vice versa, with DBLINK in postgres

I have a DB (DB1) in postgres 9.4 who use DBLINK to query another DB (DB2), and vice versa, using views and functions. But now i have to add 2 schemes to DB1 (CLIENT1 And CLIENT2) and i want when i ...
1
vote
0answers
66 views

Schema for ACL/User/Group/Role management

I'm building an app with some fairly complex permission and ACL rules and want to get my schema right. These are my goals: A user signs up on behalf on an organization. Organization has groups. ...
1
vote
0answers
51 views

Allow user select from table in another user's schema that has policies set

I have an oracle10g database with 2 users - user A and user B. I want to select data from a table in user A's schema from user B. I have granted user B select privileges on the table in question but ...
1
vote
0answers
74 views

Alter schema of Access 2013 database with linked table

I'm trying to change the schema of an Access 2013 table. I want to lengthen some of the text fields. When I change the schema and try to save I get dialog with Operation is not supported for this type ...
1
vote
0answers
23 views

How to differentiate between class and attribute

I have this problem: Library has books, VDOs, CDs Journals. It gives loan to users. Books and Journals can be referential which cannot be loaned out more than 2hrs and non-referential which can be ...
1
vote
0answers
26 views

CLR UDT SCH-M blocking

I’m hoping someone can provide some guidance on a problem I’m having with schema locking on C# CLR UDT’s. I’ve been on the Internet for an extended period of time researching my problem without ...
1
vote
0answers
55 views

Mongodb schema design validation

I am building an app which allows users to do some "tasks" to earn points. The "tasks" are part of a "campaign" which themselves are a part of "brands". I am confused about the schema for storing the ...
1
vote
0answers
76 views

In terms of relational databases is a Relvar the equivalent to a Schema?

I've been reading up on relational databases and the term Relvar and schema keeps coming up. From my understanding: A relvar is a variable holding a relation. A schema is a logical definition of a ...
1
vote
0answers
32 views

To implement a facade DB table or not? [pics]

Does it make sense to normalize a schema with tables that only serve the purpose of logically separating parts of a system? Below are 2 example schema with what I am talking about. (sorry about the ...
1
vote
0answers
98 views

Do supertables produce bottlenecks?

There are several alternatives to using polymorphic associations and one of them is to use the so-called "concrete supertable". From my point of view, this is the neatest solution and is pretty easy ...
1
vote
0answers
559 views

Lossy Decomposition meaning

Suppose I have a relation R=(A,B,C,D) and I decompose it into: R1=(A,B,C) R2=(A,D) then if it is said that the decomposition is lossy,then what is the meaning of that statement?I have an ...
1
vote
0answers
210 views

MySQL Workbench Forward Engineer from only the current diagram

I want to create a test database from a huge schema in MySQL, but when I try to do Forward Engineer from a Diagram with about 6 tables, it try to create all the tables, views and routines groups that ...
1
vote
0answers
519 views

MySQL Space efficient way of storing indexed key-value pairs associated with table

We're storing transactions in an accounting system using two tables, one contains the general description of the particular transaction (the other contains the entries, one for each account - which ...
1
vote
0answers
118 views

Cloning Postgres schema/tables across multiple servers

I'm working on a project that has databases across multiple servers, with one server for each business client. The project has some identical 'base' tables that are present in all the databases (for ...
1
vote
0answers
137 views

Are duplicates ever acceptable in a database

A warehouse system I am working on allows inwards consignments [type = 0] and outwards consignments [type = 1]. The user selects multiple products for each consignment and then multiple warehouse ...
1
vote
0answers
896 views

How to represent class table inheritance (current DBMS-specific way please)?

I want to implement class either-or table inheritance (Account, CatAccountDetails, DogAccountDetails) in SQL Server. I found a recommendation for MySQL here (How do I map an IS-A relationship into a ...
1
vote
0answers
697 views

Powershell to dump database schema to text file

I want to be able to dump a database schema to a sql text file using Powershell. I want this because our DBAs want to be able to do a diff on the file that is committed to SVN. They won't execute it ...
0
votes
0answers
7 views

Maximum number of TEXT/BLOB columns per table/performance of table with many of them?

I've created a system that generically imports CSVs into a database table with metadata columns for keeping track of when a CSV record has been changed, and it allows filtering on CSV columns instead ...
0
votes
0answers
4 views

How would I script standing up a MySQL instance with certain specs?

Context: I seem to be unable to find in MySQL Workbench schema creation process where I can adjust server specs like max memory (2 GB); CPU usage, 1x 4 core; 20 GB SSD/Flash storage; OLTP; OS (RHEL ...
0
votes
0answers
33 views

Chemical Availability Database Schema

Looking to create a database to track available inventory by lot number on a database. Raw Materials are received in batches with id #'s in units of pounds and pulled in different amount from those ...
0
votes
0answers
21 views

Cassandra filtering multiple items

I am attempting to learn Cassandra by taking my RDBMS database and create a nosql version of it. Forgive any mistakes I am just making a quick example so I can ask my question. Here is my ...
0
votes
0answers
34 views

Registration Schema Implementation

I'm building an online app that is going to handle reservations. Individuals making reservations can make one for a single day or multiple days. I have come up with two schema and cannot see much of a ...
0
votes
0answers
20 views

Address database scheme - multiple links

I am currently building a databse scheme for a small company. But at the point doing it I figured out that my attept will be unacceptable due to the ability that one action will affect multiple ...
0
votes
0answers
23 views

List Schema Size - PostgreSQL 9.2

I'm trying to get a real schema size... But I'm getting different results using two queries. Can you please help with a real trusted query to get the size of a schema? Schema name: gorfs Query 1: ...
0
votes
0answers
16 views

Category of the same object in SQL and Inheritance.

I am trying to make the relational schema for a shop which sells ice creams and drinks. As the ice creams and drink both fall in the same category of Items, i tried making the items entity but i am ...
0
votes
0answers
20 views

Table design one or more

I am struggeling with the following issue. I have a table executives and supervisor, quite similar in the structure. Both of the executives can have a Car one or more. Should I make a table ...
0
votes
0answers
9 views

Database ERD for orders info

I have two tables: 1-orders order_id 2-shipping_and_billing order_id FK address_type(billing and shipping ) city I need to get full info of shipping and billing in single select of ...
0
votes
0answers
11 views

Restrict postgresql roles based on rows in upper level table

We have a postgresql database, and it is expanding to be used by more groups. The data from these groups will all live together in the same tables, but we need to restrict access to the data based on ...
0
votes
0answers
64 views

create table in a different schema

I am trying to create a table on a different schema without using "create any table" privilege. I have an application user/schema. TABLESPACE_NAME USEDMB MAXMB ...
0
votes
0answers
38 views

Why default db privilleges are not applied on a new schema?

I have a user with all privileges granted by default in database properties. I create a new schema as postgres and table there. I expect that the user should have an access to this table but it looks ...
0
votes
0answers
24 views

Schema Design for multiple many-to-one relationships. of which exactly one should exist

Say I have table A, B, and C. B and C can both be related to multiple A's, but each A should have exactly one of either B or C related to it. Which database design is better: A: a_id, b_id NULL, ...
0
votes
0answers
26 views

Help creating database schema to build database off

not sure if this is the right area for a question such as this but I am looking to create a database for an IS warehouse who deliver laptops, desktops, monitors and other peripherals to different ...
0
votes
0answers
66 views

Hard dba case [schema to store delivery prices for shops]

I want to make a database scheme which would allow me to fetch the delivery price for the different Shops basing on the delivery destination (Address/Region) and order value (price). Here is the ...