Database design is the process of specifying the logical and/or physical parts of a database. The goal of database design is to make a representation of some "universe of discourse" - the types of facts, business rules and other requirements that the database is intended to model.

learn more… | top users | synonyms (2)

0
votes
1answer
10 views

soccer leauge er diagram

i am planning on creating a database to track teams and players in a soccer league. the stats i wish to track are as follows... goals scored/conceeded(gk), assists, minutes played, cards received and ...
0
votes
0answers
6 views

Will coloum size change when trying to use single unicode character in place of multiple ASCII characters?

I have a column in utf8_unicode_ci collation for text type in MySQL. The content is in Unicode, I have used tags like {br}, {v}, {t}, {h} etc.., throught the database. I am now thinking of changing ...
0
votes
0answers
12 views

database_quiestion_determine_2NF_3NF

I solved this example to determine 2NF and 3NF. I would like to check if my answer is correct. Can somebody check the 2NF and 3NF of this example, please? R( A B C D E F G H I J) with functional ...
0
votes
1answer
19 views

Alternative to RDBMS: Modeling Exam/Testing data

I'm a born and bred relational database guy and C# programmer dude. IBM DB2 & VB.Net in school. TSQL & C# at work. I'm planning a project for fun: Designing a Testing platform that goes from ...
1
vote
0answers
15 views

How to query against legacy data that needs to be cleaned up?

I have an existing SQL Server DB with 3 tables (note: this is a made up example, but modelled after a real problem). Artists : contains music artists MusicRecords : contains information on music ...
0
votes
1answer
21 views

Copy of a database with an existing database with schema and data in sql server

I have two databases one is having master kind of tables and other will have transaction data. I should create a new database with a structure of an existing database to my clients. Here is the ...
2
votes
1answer
28 views

How to enforce an “exactly-one-per-group” constraint?

I have a table x that I've defined like this: CREATE TABLE x ( xid INTEGER NOT NULL PRIMARY KEY, yid INTEGER NOT NULL REFERENCES y(yid), is_principal BOOLEAN NOT NULL ); This definition ...
0
votes
1answer
23 views

Advisable number of foreign keys in a single table [on hold]

I was wondering, keeping performance and optimizations in mind, while designing the database, is there any advisable number of foreign keys you should keep in a single table? At present, few of my ...
1
vote
2answers
14 views

How to normalize a table that contains a CK not included in the PK?

I have the following table. The PK is model_ID. Assuming that the modelName field is unique(that is, no two brands can have an identical modelName), there is a transitive dependency between modelName ...
0
votes
0answers
23 views

What kind of data cannot be stored economically in a database / data-warehouse?

Someone mentioned this in a presentation but didn't provide any examples. This stuck with me and I am trying to figure out what kind of data couldn't be stored economically in datbases ever since. It ...
0
votes
1answer
39 views

If A and B are candidate keys, then AB is candidate key or not ?

If R{abc} is a relation, f{ a->b b->a a->c b->c }, then a and b are candidate keys. What about ab ? Is it a candidate key or is it a super key or both ?
0
votes
0answers
14 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
13 views

Manage orders based off product attributes and quantity

I'm developing a database for an online store in which the Products have multiple attributes and attribute types. ATRIBUTES TYPES atrtype_id name (like size, color...) ATRIBUTES atribute_id ...
2
votes
2answers
51 views

Is there a way I can speed up queries against this particular view?

I have three tables in a PostgreSQL database that I'm querying via a view and some joins. CREATE TABLE network_info ( network CIDR NOT NULL, some_info TEXT NULL, ...
0
votes
0answers
14 views

linking a single table (comment) to multiple tables (article,link,attachment)?

the main idea is that i can post an article , link or an attachment and i can receive comments on each of these types of posts (the structure of the comment is the same) , the problem here is that i ...
0
votes
0answers
19 views

Multiple user roles with different attributes

I need to design a database that has multiple users, with multiple roles. For instance, a user can be an admin, company, employee, or customer. Each user can have any number of these roles. Right now ...
0
votes
2answers
34 views

Normalising shared entities and applying constraints

I'm looking for a specific "best practice" or "pattern" concerning entities that are shared between different entities, having a relation to one of many. For example, one may have the generic entity ...
0
votes
1answer
19 views

what databases have the implementation of sort merge join? [on hold]

So many databases and distributed data warehouse frameworks, which have the sort merge join implementation?
0
votes
0answers
20 views

How to store likes to posts in Parse.com database?

In my parse database I have a classed called Post and Like. Should I create a field likes in Post class with Relation<Like> type or there is another better option of storing likes in Parse DB?
2
votes
1answer
38 views

Compare the structure of two MySQL Databases

I have two MySQL databases that are very similar to each other. How can I find out the differences in tables, and the differences in columns in each table? the databases are in different schema. ...
0
votes
1answer
58 views

What is the best design for storing courses subscription data?

Building an app that will manage lessons, students, courses. Each lesson belongs to a certain course. A student can subscribe to a single lesson or to a whole course. So it seems straightforward that ...
0
votes
0answers
25 views

How to cast as type of a table column?

I have multiple views with union like this: select column1, column2 from mytable union select cast(extcol as nvarchar2(15)), cast(extcol2 as nvarchar2(10)) from exttable But later I change the size ...
0
votes
0answers
13 views

Database design for varying prices from multiple vendors

I am designing a database where the products are sold in bulk with multiple pricing options, from 4 different vendors. What is the best table configuration to store this information? Id like to be ...
0
votes
0answers
14 views

Trying to Figure out an ER Diagram for a set of instructions

Below is information about a database and I want to come up with the ER Model. (Im not sure if this is the right place to post this. Im new to this page) professors have an SSN, and a name projects ...
0
votes
0answers
36 views

MySQL Dynamic columns duplicate value workaround

As the title suggests i have the following code which transposes certain row values into field names, however the problem im having is that the values "closed" & "reopened" may appear in several ...
1
vote
2answers
41 views

Database design for attendance feature

My app has a requirement wherin we need to capture attendance details of a class. A class typically has 50-60 students and there will be records with attendance/absense status of each student for a ...
0
votes
1answer
20 views

What should be the structure for a person-to-person store database

I am going to create a person-to-person store with Laravel, a website whose users can share and sell their product or their mobile, TV, Computer, Shoes, Shirts, Books ,Cars, Bags, Animal etc. I am ...
-2
votes
0answers
18 views

Gathering data from poll and displaying on website [closed]

I am absolutely novice when it comes to working with database and website. So I would appreciate if someone guides me how I can implement the following task. I have created a poll on polldaddy.com ...
0
votes
0answers
12 views

Performance/Maintenance Implications of a Write Heavy Table In An Otherwise Normal “CRUD” Database

We have a small-ish (<100,000 rows) MySQL database (on Amazon RDS). Its supporting a fairly simple read heavy CRUD web application. Currently we're building out a web analytics system. It will ...
2
votes
0answers
57 views

Covering Index - Insert Performance

We are running some performance tuning on our database in SQL Server. The database in itself is pretty small with around 13 tables. But there are multi-level relationships between tables. When I try ...
0
votes
1answer
23 views

Using part of a compound key as foreign key

We have the following situation, in which we have three tables: Article ------- - Id (PK) - Supplier_Id - Supplier_Contactperson_Id - Name Supplier --------- - Id (PK) - Name SupplierContactperson ...
0
votes
0answers
11 views

Database systems with users and sub users accessing the data

I am making a database for school student maintenance. Below is the basic description. There are schools. One school has many staff (i.e: Principles,Teachers, Section Head, Office Staff etc) These ...
0
votes
1answer
25 views

Daisy chaining two is-a relationships?

I'm currently dabbling in ER modeling and wondering if it is possible to create a chain of is-a relationships. Example: Here I'm basically trying to model specific in-stock items available for rent ...
0
votes
1answer
57 views

Transpose MySQL rows as column names - DYNAMIC

My goal is to be able to calculate the time difference between the ticket timestamp being created and closed and if reopened Add time from being reopened to closed again etc.. I have an existing mySQL ...
1
vote
1answer
31 views

mongo: how should I layout my data

I have 2TB of data currently spread across many CSV files that looks like: { 'rec_date': "2010-01-29", 'rec_time': "09:15:00", 'site_no': '46', 'data_owner': '1', 'flow_period': '5', ...
0
votes
1answer
29 views

How to reference categories table in products table?

I am using modified preorder traversal algorithm to store product categories in database (like image shown above). But i don't understand how to reference it in my products table. Here is my ...
0
votes
0answers
25 views

Designing a correct table structure

We are trying to save the Family History of a particular foreign job applicant. Below are the details we have to save. Familiy Member: Father|Mother|1st Brother| 2nd Brother| 1st Sister| etc etc ...
1
vote
2answers
69 views

Design: how to store lots of booleans?

What is the most optimal way to store lots (up to 300) of properties about an object? All properties determinate presence of a factor. Like, "has dog", "has cat", "has garden", "has N". Initially I ...
1
vote
2answers
36 views

Table design for linking pictures to a place

Could someone give me some advice on designing a table for a system that has to store x picture for 1 place? Is it better to have something like this: place table: id_place / reference 100 ...
2
votes
1answer
180 views

Why do/should DBMS cache at the application layer?

This article describes DBMS as caching data at the application layer, which is why they often use Direct IO to bypass the file buffer cache. My question is: what benefits are provided by the DBMS ...
1
vote
1answer
183 views

Designing a High Score/Leaderboard table

I'm looking for input on how to design a highscore table for a game I'm creating. The database I'm using is postgres. That's not really something I can or want to change (unless there's very good ...
0
votes
0answers
61 views

ER diagram to tables [closed]

Consider the following exam question: Translation: The INCORRECT transformation from the diagram at the right to tables is... This is what I think: a) is incorrect (the column es_C (is_C) does ...
2
votes
1answer
67 views

How to return a record from function, executed by INSERT/UPDATE rule (trigger)?

I'm having some issue when I'm trying to join two tables in a single view (for migrating code we want to split one big record into two records). I'm using Postgres 9.4! Here is an SQL fiddle. The ...
0
votes
1answer
30 views

What does normalization say about storing data from objects that use a decorator pattern?

I am just curious as to what the best practices are for storing the data from objects built using decorator design. I have a base class and can decorate it with A, B, and/or C, with A B and C having ...
0
votes
0answers
9 views

Modeling attributes relations in RDBMS/NOSQL?

I have a table to hold the relationship between attributes and documents: I need to support the following queries : give all documents where attrib X='value' give me all documents where attib ...
0
votes
2answers
60 views

Database structure for hierarchical quiz?

I'm doing a personal project where I have a quiz with a number of boolean questions. Each question will have a two answer choices "true" and "false". Based on the selected answer, a new question will ...
2
votes
1answer
76 views

I can't create relationship in my database sql server

I have designed a database for my website. It has 3 tables: user, topic and comment. A user has many topics (or articles) A topic (or article) has many comments A user has many comments I ...
0
votes
0answers
20 views

How to have a relation applied only to all entities related to another given entity?

Let's say I'm trying to design an online server for judging a bunch of submissions to several problems. Firstly, each problem has many subtasks (which must go to one problem alone). For each ...
2
votes
1answer
34 views

Does SQL Server redistribute data after adding an additional data file?

Imagine a database about 30GB in size using 3 data files on the same disk. Someone told me to have one data file per processor implemented to get full performance on all cpus. So if I now add three ...
0
votes
1answer
59 views

What's the best database if i want save data temporally? [closed]

I want to create a datalog system so I need to store some int data temporally. What would be the best database (Relational, NO-SQL or some specific) for that purpose? And what would be the best way to ...