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
vote
1answer
22 views

db schema for a object with multiple foreign key tables

I have a question table which contains question_id, question_text and choice_type_id ( say freetext, binary choice and multiple choices ) Now, the question table (which has question_id, ...
0
votes
0answers
15 views

When to put an attribute in a new table? [closed]

When should I put an attribute in a separate table? I mean is I have an attribute but whether I should put this with the rest of the attributes of a table person or whether I should put it in a ...
0
votes
0answers
15 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 ...
2
votes
0answers
29 views

Tuple Relational Calculus help? [closed]

I have the following three questions in relation to the following diagram: 1) How many copies of the book titled “The Lost Tribe” are owned by the library branch whose name is "Sharpstown"? ...
2
votes
1answer
36 views

Why wouldn't I put the single preferred option into its own table, instead of having a 'Preferred' column?

In similar spirit to How to implement a 'default' flag that can only be set on a single row I would like to specify that, for any given list of possible names for a business, only one of the ...
0
votes
1answer
63 views

Is an ER diagram an example of a conceptual, logical or physical schema?

I have been reading databases, and I clearly understand the difference between a conceptual, logical and physical schema. An ER diagram is an example of which of these schema's?
2
votes
4answers
39 views

How can I compare the schema of two databases?

Is there a way to find the differences in two SQL Server databases (schema only). One is local and the second is at a customers site. We are experiencing problems with crystal reports running some ...
0
votes
0answers
9 views

Database Design for Resume and Sections

I am trying to figure out if I am on the right track here. resumes id user_id resume_sections id name desc Sections are those that we normally find in resumes, experience, skills, education and ...
0
votes
1answer
84 views

Pros and cons of using many schemas in PostgreSQL as opposed to just one?

For a large SAAS application (backed by PostgreSql 9.4), with over 300,000 accounts (and growing), what are the pros and cons of using a schema per account to partition the data vs putting all the ...
3
votes
2answers
144 views

Is EAV an appropriate design for a collection of coexisting metadata-rich “fact estimates” on objects? [closed]

I'm attempting to architect a system that will collect estimates on various quantities (10+) on each of many (300K+) objects, and make decisions from the historical record of these estimates. For ...
0
votes
0answers
9 views

Schemas with the same name in a Redshift cluster?

Is it harmful in some way to have multiple schemas with the same name in a database cluster, specifically Redshift? I want to create multiple databases, and then create a schema "tables" or "data" or ...
0
votes
0answers
7 views

How to handle private local databases in a multiDB cloud environment

In context of Platform as a Service (PaaS), we would like to offer our clients a private platform. A platform includes a website and a database. A platform is not 100% separated. Users could "travel" ...
1
vote
0answers
4 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 ...
0
votes
1answer
59 views

Select rows from table where each row refers to a different schema

I have customer table in public schema. And I have a schema named after each customer. Each customer schema contains different tables like portals, plugin, ... When I want to select portals used by ...
0
votes
0answers
38 views

Railway Reservation System [Miniature] Schema

I am working on designing a schema to support the development of a miniature railway reservation system, using oracle 11g XE. This is for a project purpose, I am need to be sure about the correctness ...
1
vote
1answer
57 views

Use a set database schema or EAV design? [duplicate]

I have already created a database design with a set schema. The database schema is for a web quotation form. PS it is not a simple quotation form and hence need to customise the form, form builders ...
1
vote
0answers
21 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 ...
2
votes
1answer
51 views

How to efficiently create a new PRIMARY KEY CLUSTERED definition online

Given a table with a PRIMARY KEY definition (acting as the clustered index), I want to efficiently change the definition of the PRIMARY KEY (or at a minimum, just the clustered index) online. I would ...
0
votes
2answers
25 views

Can we determine FDs if we are given some tuples?

I am taking a databases course and i'm learning about functional dependencies. I have searched around and did not find any information on this. My questions is if we are given a table with some ...
0
votes
0answers
15 views

The MondoDB.org “Category Hierarchy” Example

I am creating an MVP app for a client but I am skilled in iOS mainly with only some DB experience. I'm using MongoDB. The schema is for a Product Catalog for small markets. The client wants a ...
1
vote
2answers
90 views

Is there a best practice for recurring calendar events

I'm not a dba but a php programmer, so that I'm not an SQL pro. Now, I have searched in both programmers and dba stackexchange sites but the answers are too specific or not conclusive. My question is ...
0
votes
0answers
8 views

database structure for an object of keywords

Each object I am storing is made up of a title, a description and 10-20 keywords. Each keyword is grouped and some groups can only have one member keyword assigned to an object. Objects will only ...
0
votes
2answers
35 views

Is it a good idea to add a reserved field to a large MySQL table?

As you may know adding a new column to a MySQL table with millions of records is hard and in some cases impossible. Is it a good idea to add a text column to each table (say, meta) to save some ...
0
votes
1answer
62 views

Dropped connections, corrupted schema … is MySQL sick?

Lot's of problems and I wonder if it's all tracable to some root cause. I'm trying to load a simple schema related to product marketing. The symptoms are: Not being able to forward engineer said ...
0
votes
0answers
16 views

How to model role and different activities

I am new in the database design and I'm facing this problem, I hope somebody can help me. In my domain we have 3 roles, Non-Supervisor, Supervisor, Manager. I created a Person table and a role table ...
0
votes
0answers
44 views

what is better, multiple column or multiple rows while schema design

I would like to know, which is best in fast retrieval and reporting as numbers of records will increase with time. So lower the record better would be the performance. Priority would be fast response ...
0
votes
1answer
65 views

How does Amazon create the RDS for Postgres? Some kind of Docker?

I am really curious about the infrastructure of Amazon. When I create a new instance of RDS, it gives me a host, username, password.. Everything. Behind the curtains, how do they do this? It´s some ...
0
votes
0answers
22 views

Percona and MariaDB-10.0 ignoring not null on table fields

On the percona-5.6 and MariaDB-10.0 servers, the NOT NULL declared on table field are being ignored. I am able to leave fields declared as NOT NULL empty when inserting data and the servers are not ...
1
vote
1answer
124 views

Not able to solve issue: Incorrect string value: '\xC5\xABt\xC4\x97'

I am facing database error Incorrect string value: '\xC5\xABt\xC4\x97'. I did a lot search and tries a few ways, include move from utf8 to utf8mb4. But still not able to solve it. Following are the ...
1
vote
1answer
76 views

Insert rows in a table, via a row-level trigger, activated after insertion in that same table

I have to design a schema and trigger system in SQL that will save words and their synonyms. I thought of this basic schema: create table words ( id int primary key auto_increment, word ...
1
vote
0answers
30 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 ...
0
votes
1answer
63 views

In Oracle, how to get a list with the names of schemas that a user has read permission?

In Oracle, i need list which schemas a particular database user (or the current database user) has read permission. Based on this information, also need to get all the tables and views are in each ...
4
votes
1answer
85 views

Schemas and user permissions

When our custom, home-grown CMS creates data tables using the GUI, it creates them against the site-specific user schema (i.e. sitename) instead of the dbo schema. The issue is that our ...
0
votes
1answer
29 views

Design for periodic data cuts

I've been building an application that has a 6-monthly update schedule, i.e. a cut of the data for H1 & H2 of each year. The previous version of this application implemented this by making a copy ...
1
vote
1answer
42 views

Need Help in building database

I am developing an app that send messages (email and sms) to users. The db must also maintains the list of messages send to users. And also the status of messages send to user like send or failed. I ...
0
votes
1answer
79 views

Migrating everything to do with a schema from one Oracle DB server to another

We have an old DB server, running Oracle 11g on Solaris. We also have a new DB server, also running Oracle 11g, but on RHEL. We want to move a schema to the new db - but we need everything it refers ...
1
vote
1answer
38 views

Schema copy from 9.5 V to 10.5

Using DB2 move utility db2move to copy schema and database from source to target server. The source server is Server1. The target server is Server2. Do I need to set up the TCP/IP port ...
2
votes
0answers
42 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 ...
0
votes
0answers
88 views

LCK_M_SCH_M Blocking

I have 2 stored procedures (one vendor, one third party) that are constantly (monthly) stepping on each other. They both (for some reason) acquire a schema lock when all they are doing is updating ...
0
votes
0answers
25 views

Accounting - Dimention table in mysql

I am designing a accounting and mini erp system. I use a date dimension table to track all date related data. In oracle we can have many schema for a database. so we could create each schema for ...
0
votes
1answer
61 views

ALTER TABLE blocking in MySQL 5.6

I have a question with a MySQL 5.6 master-slave setup. If I were to modify the master's schema with an ALTER TABLE SQL query, then when the slave tries to execute that ALTER TABLE statement too, would ...
1
vote
1answer
86 views

PostgeSQL 9.3: What is the difference between text and pg_catalog.text?

I have a classic 3-environments setting (dev, staging and production), each with its own RDS PostgreSQL 9.3. The client/server versions are psql (9.3.5, server 9.3.3). In order to keep the schemas ...
0
votes
2answers
49 views

Is there a way to replicate certain part of collection in Mongodb

Is there away to stream certain part of collection in MongoDB or TokuMX from master server to another server? I need to duplicate only certain collection Or if it isn't possible, are there any other ...
1
vote
1answer
36 views

can I give permission to insert into view, but not to referred table?

Here I have a view in public schema referring to the table in private schema: CREATE OR REPLACE VIEW public.products AS SELECT products.id, products.product_id, products.title, products.company_id ...
2
votes
1answer
53 views

MySQL table indexes change location [closed]

Is it possible to move the MySQL Table indexes to another location rather than "datadir" ? for example a ssd drive or memory partition ?
1
vote
2answers
35 views

Schema/Structure to handle secondary computed data

I'm trying to design a LAMP-based website for my pinball league, which plays competitive pinball every week in match play. One of the features of our league is that we convert raw scores to ...
0
votes
2answers
49 views

Can I update only the needed changes in a database?

First of all, I apologize if you can't understand very well what I am saying and it can be edit for better understanding of my post. The next example is for better understanding of databases with ...
1
vote
1answer
42 views

How can prevent writes to a Postgres schema for a period of time?

I am moving a schema from one server to another using pg_dump + pg_restore + drop schema cascade. I need to know that no applications are writing to it (or at least that the writes will fail) during ...
0
votes
1answer
174 views

copy data from public schema to another schema in postgresql

I'm creating a multi-tenant RoR app using PostgreSQL 9.3.5 running on linux (Ubuntu 14). I'd like to copy the data from my public schema to another schema. I tried: pg_dump -U my_username -h ...
0
votes
1answer
20 views

How to store external IDs from different sources?

I have a table of customers with a PK that we can use as an identifier for our internal system. These customers may belong to different companies, each of which may have an external ID in some ...