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

7
votes
1answer
355 views

Designing Simple Schema for Disaggregation of Demand Forecast

I am doing a simple database design task as a training exercise where I have to come up with a basic schema design for the following case: I have a parent-child hierarchy of products (example, Raw ...
2
votes
1answer
426 views

How to normalize my db schema for a quiz application?

I am putting together a quiz application. (I'm calling each quiz a "challenge") I have a "challenge" table and a "challenge_question" table which is pretty straightforward. challenge table: id ...
2
votes
1answer
719 views

Designing database with Category and Tags for Posts - Seeking for guidance/advice

I'm not really a database novice but I'm not an expert either. Problem: I'm having this difficulty on designing my Post, Category and Tags relationship. I've read Normalization many times but could ...
2
votes
1answer
255 views

Best embed/reference/field strategy for many inserts (mongo)

I'm building a gaming backend with Mongo, and have some issues on how to best design the schema to maximize performance and database size. My models: User Match -ReferenceMany (User) ...
1
vote
1answer
20 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 ...
1
vote
1answer
41 views

MySQL Junction Table as Foreign Key?

I have several tables: company, customer, company_has_customer, and transaction. company_has_customer is a many-to-many junction table using the PKs of company and customer as its PK. In almost all ...
1
vote
1answer
74 views

mongodb Date strings and other issues

I asked a question on Stackoverflow, and was told that my schema was way off. I am using mongodb to store whether or not a log file exists. The log file contains info for an hour. I'm not actually ...
1
vote
1answer
294 views

Should I save “document ID” as a String or Number in MongoDB

So I'm importing about a 100,000 documents into mondoDB. MongoDB already generates an Object hash but the data has a documentID that was used to identify records in the previous database. The IDs ...
0
votes
1answer
15 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 ...
0
votes
1answer
24 views

Re-posting schema

I'm building a social network very similar to Twitter, in which users can see a feed with content posted by users they follow. Users can like and re-post (i.e. "Retweet") posts. Re-posted content ...
0
votes
1answer
22 views

Which foreign keys do I use if they are repeated

I have the following two tables company_relationships |ID|Company_ID|Affiliate_ID|<Relationship Info>| +--+----------+------------+-------------------+ jobs |ID|Company_ID|<Job Info>| ...
2
votes
0answers
15 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
81 views

Which is the better schema design for a voting system?

Imagine a q/a site or forum similar to stackoverflow. I'm trying to determine which of these two methods would be the better design for a voting system: (note: I would also like to keep record of all ...
2
votes
0answers
50 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
242 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 ...
1
vote
0answers
24 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 ...
1
vote
0answers
28 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
63 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
134 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
72 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
327 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
83 views

Schema for yearly data models

I am developing a school management system. Most data will not be reused after the end of the school year. I am contemplating using schemas to separate data in various school years, however I am ...
1
vote
0answers
84 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
109 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
693 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
582 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
346 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
25 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
16 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
0answers
38 views

How to determine a schema version at runtime

Is there a portable way or best practice to access a version number for a schema at runtime? Rationale: you have multiple systems (development, QA, etc.) where you push schema changes from one system ...
0
votes
0answers
26 views

Entity Schema Design

I'm working on an application that has an "entities" system (built before my time) that models users, customers, contractors, vendors, etc. These are all types of people, but have different needs in ...
0
votes
0answers
18 views

How to store highly configurable relationships based on multiple conditions

I'm trying to devise a schema that needs to be extremely configurable when necessary, but also minimal wherever possible. There is a large number of condition types that would lead to a number of ...
0
votes
0answers
21 views

Database & Structure for SaaS reporting software

I'm building a SaaS application to allow users to upload data and perform reporting and analytics on it. The reporting and analytics would be quite simple like grouping and aggregating. This has ...
0
votes
0answers
77 views

Changing Schema ownership and side effects

I am trying to understand why changing schema ownership is causing permissions to be revoked. I am having a hard time understanding schema ownership change. Here are the steps I have taken in ...
0
votes
0answers
34 views

Export sql server table connections schema

i am using RazorSQL to connect to a Microsoft SQL Server database. I am looking for a way to visualize the tables connections schema. Do you have any idea how I can export such a view?
0
votes
0answers
101 views

Cassandra: unstructured document storage?

I'm fairly new to NoSQL, but fairly experienced with SQL-based relational databases. We are evaluating Cassandra for one of our applications. I've seen where Cassandra is claimed to be able to store ...
0
votes
0answers
13 views

Managing schema migrations in Mondrian

Managing schema changes across dev, stg, prd is something we do well in our home-grown solution today. Specifically, at least one downstream team consumes our star schema. They're considering ...
0
votes
0answers
94 views

How to share Users table between Clients and Customers?

I have a rental system where the system admin can add clients and their users. Each client's user can manage products, categories, orders etc., as well as their own customers. However, while ...
0
votes
0answers
34 views

Multi language where this feature never existed

I need to implement multi language system in an existing system that was not developed for this. The number of entries in the tables that will hold data that has to be translated will not exceed 5 ...
0
votes
0answers
205 views

Review a database schema for a design approval system

I'm working on my first web application that will utilize a database. The basis for the application is a design approval system. I work for a company which mainly produces print and online marketing ...
0
votes
0answers
111 views

Mysql profiler different duration information_schema.profiling

Hi! I have a problem and no idea how to resolve it. I'm trying to use mysql profiler. I'm using the command: set profiling=1; to turn it on. Later, i execute my query which is correlated ...
0
votes
0answers
50 views

Unique database presentation ideas

I have completed the first phase of a fairly large database schema design. I built the ER-diagram in DIA. I have to present the schema to an audience of fellow software engineers. Any thoughts on ...
0
votes
0answers
51 views

How should I restructure a table that contains multiple columns that contain similar, but not same data?

I currently inherited an InnoDB table that describes a product. In the table there are a few columns that describe the maximum height at which the product may be mounted. These are the columns: ...
0
votes
0answers
49 views

Schema & Database Role Permissions Issue

I have a Schema and a Database Role. An Active Directory member is added to the Database Role. I grant the Role Select permission on the Schema. Control permission is denied on this Schema. However, ...
0
votes
0answers
14 views

Reducing schema to shrink real-world data to a functional subset

I work with two editions of a shipping product; call them "A" and "B". Both use similar a database schema, but edition "B" has a strict super-set of the schema (and features) used for edition "A". ...
0
votes
0answers
301 views

XML Data convert to SQL database,

I have an XML feed that i need to parse daily, i want to store all of the data from the XML feed in a SQL table so then that data can be queried and manipulated by my clients. I can currently parse ...
0
votes
0answers
82 views

In regards to GS1 barcode - what size DB field are used?

In regards to GS1 barcode - what size DB field is used or is the entire GS1 typically not stored in database, but rather processed in the application layer and stored in the database as a collection ...
0
votes
0answers
47 views

Examples of a database with no consistency measures that ensures consistency through schema alone

To clarify, the database can be any type RDBMS, NoSQL/BigTable. However, it must not employ any usual consistency measures such as locks, or synchronization, but the inconsistency-invincibility must ...
0
votes
0answers
112 views

Database (open source) for complex queries (for analytics) like these:

In an app, I'll be storing information about events, specifically, session_id url time type data: foo: bar bar: foo The data will basically be a hashmap (need to support arbitrary types / names ...
0
votes
0answers
207 views

Schema for Google Docs-like sharing

Am trying to design a nicely normalized schema for sharing entities in a database, with good referential integrity. It should work similarly to Google Docs sharing. Here is what I have so far: ...