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)

1
vote
1answer
90 views

Recipe Health risk Database ERD structure

I have these tables: First table(Recipe table), Recipe recipeid(PK,AI) recipename ingredients Second table(Ingredients table), Ingredients ingredientid(PK,AI) ...
1
vote
1answer
361 views

Time series and gap filling

I have to choose a database server for storing big time series data. Currently I use PostgreSQL, but I've found that Vertica supports automatic gap filling for missing data and that's really nice. ...
0
votes
0answers
10 views

Is the use of my lookup table efficient?

I'm trying to find the best way to architect the relationship in the scenario that: A team can have multiple players, a player may also have multiple teams My first thought was to use a lookup ...
0
votes
0answers
18 views

Best way for storing multiple account record every day [on hold]

I need to store data from multiple accounts. About 300 record that are generated every day. Sample data: 100000 Account one 9$ 3/2/2015 100001 Account two 70$ 3/2/2015 100000 Account one 10$ ...
0
votes
0answers
27 views

Table Design For Patterned Data Using Variable Bucket Ranges

Looking for table design for this scenario to be implemented on SQL Server 2012 instance. Scenario There are a total of seven types of reported data, each with variable number buckets of ...
3
votes
1answer
7k views

Fixing table structure to avoid `Error: duplicate key value violates unique constraint`

I have a table which is created this way: -- -- Table: #__content -- CREATE TABLE "jos_content" ( "id" serial NOT NULL, "asset_id" bigint DEFAULT 0 NOT NULL, ... "xreference" varchar(50) ...
0
votes
0answers
33 views

Database design for a railway system [on hold]

This is how I intend to design my database: (It is for an academic project) Table Trains: TrainUID # primary key TrainNumber # Official train number do not need to be unqiue Traveldays # ...
1
vote
1answer
94 views

representation in ms-access

I have a database in microsoft access. I want to know how to look up a singular datum from a reference table giving a dynamic set of values. Here is a representation of what I mean: I have the ...
-2
votes
1answer
31 views

How to define one to many relationship in a SQL Server database [on hold]

How do I create the relationship that is defined in above image? I have created two tables both have a column ID (auto-increment) as their primary key.
-1
votes
2answers
61 views

Question about choosing primary key

My scenario is that I have a super type named PERSON and two sub types EMPLOYEE and CUSTOMER. I use the Primary key from PERSON, PersonID, in both EMPLOYEE and CUSTOMER as foreign keys. However, I ...
0
votes
1answer
50 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 ...
0
votes
1answer
40 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
16 views

ERD to data structure

I'm new to databases. I converted my ERD to data structure. Althougt I made sure all the 1NF, 2NF and 3NF are handled, I'm skeptic about it. This is the data structure. Port(PortID(pk), Name, ...
0
votes
1answer
30 views

Database Design Question? Relationships and Form Data

I am working on a project that requires to store evaluation form data. Essentially, the a reviewer will fill out a form based on the performance of the person being evaluated. Now there is well over ...
1
vote
1answer
104 views

Reviewing relational database tables

I am building a database, but I am a little bit confused with my table relationships. I wish someone could help review my table relationships below for me and tell me where I am going wrong. I have ...
1
vote
0answers
27 views

MySQL 5.1.73-cll and engine MyISAM PRO AND CONS FOR THE FOLLOWING 2 'DELETE' APPROACHES [on hold]

For MySQL 5.1.73-cll and engine MyISAM what are the pros and cons for the following two possibilities of 'deleting' rows(let's say that a user want's to delete his profile/delete some of his products ...
0
votes
1answer
33 views

Primary keys: composite and singular

In general when I design tables I always include a single unique field, even if it there is already a unique combination of columns available to create a primary key. This field is usually either a ...
0
votes
1answer
21 views

Query parent table and get child tables columns

I have two tables, one inherits the other: CREATE TABLE parent ( col1 INTEGER ); CREATE TABLE child ( col2 INTEGER ) INHERITS( parent ); Is there any way to query the parent table, such ...
0
votes
3answers
555 views

Two nullable columns one required to have value

No-Explanation Question: Is there anyway to have a constrain of 2 null values that always requires 1 to have value ? For example two date columns both null but having at least 1 that requires to have ...
3
votes
2answers
134 views

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

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
1answer
37 views

Does my database design work? Newbie!

I've uploaded an image of my database design below. This is the first database I have designed and I was hoping that I could get some input into whether or not it is set up correctly or if I just have ...
0
votes
1answer
21 views

Database design for a group-buying site

What is the best way to approach the database design for a group-buying site? If you are not familiar with group buying, people purchase a deal, and when "n" amount of people purchase the deal, the ...
0
votes
0answers
36 views

A transition table, is it a good idea?

I'm writing an application that stores a project's C++ API representation. For example, I have tables like Class, Function, FunctionParameter, DerivedClass, BaseClass, and so on. Every once in a ...
2
votes
1answer
35 views

BLObs – Should I Store In Database Or in Directory Structure?

BLObs – Should I Store In Database Or in Directory Structure I have been developing a database to replace an ageing data structure that contains 1000's of files within a directory structure. The ...
-5
votes
0answers
33 views

PHP problem using database [migrated]

$DB_HOST = "localhost"; $DB_USER = "root"; $DB_PASSWORD = ""; $DB_NAME = "practice"; $conn = new mysqli($DB_HOST,$DB_USER,$DB_PASSWORD,$DB_NAME); if ($conn->connect_errno) { printf("Connect ...
0
votes
1answer
30 views

Using the same table for entities that are almost alike when it breaks foreign key integrity?

I'm designing a website with a database that should support events that a user can sign up for, fx. a concert. Users can sign up using our internal registration system, or using an external website ...
0
votes
0answers
10 views

Store 100 GB of N-gram and fast access the N-gram [closed]

I have a scenario where I want to store 100GB of N-gram like ngram = "who is" count = "1233432" where ngram and count are the field names. Just like this, I have billions of records whose approx. ...
0
votes
0answers
45 views

What is the name for a table that keeps track of operations that have been performed on the database?

It's name is Trans_Log It has the following fields: TL_User (database user logged in) TL_WinUser (name of windows user logged in) TL_Date (date of operation?) TL_Type (type of operation / function ...
0
votes
3answers
33 views

Prepopulate database with empty / null values [mysql]

What would be the best way to pre-populate a database with 100 empty fields and then begin the Auto_Increment? What I mean to say, I want to reserve the first 100 userfields (ie UIDs which are ...
0
votes
1answer
27 views

How to save the design of an Access database — not the content — as text?

How can I save the entire design or specifications of an Access 2007 database -- not the data content -- as text, and reload after making edits to the text version of the design? I have fallen foul ...
0
votes
0answers
32 views

How to reference a table mapping that is not initially known in another table

I have four tables: ExternalName, InternalName, ExternalInternalNameMap, and Transaction. ExternalName and InternalName have a many to many relationship. ExternalInternalNameMap is the junction table ...
1
vote
2answers
55 views

SQL Server 2012: set a column to only use a single case?

Is there a way to tell SQL Server 2012 to store both A and a as A (or both A and a as a) for some given column such that every insert statement does not need to have UPPER() in it?
0
votes
0answers
14 views

How to create and select entities in MongoDB?

I'm a newbie in MongoDB and I'm trying to understand how to create objects there and how to select them in comparison with relational databases. So I need an example how to perform these things. ...
0
votes
2answers
48 views

Excel spreadsheet into a MySQL database tables

I am relatively new at database design and would like to get this right from the start. I have had differing advice on how to do this and believe that the common suggestion of importing all the data ...
2
votes
1answer
243 views

SQL table architecture

I'm looking for a SQL architecture solution for the following problem. The idea is that I have a validation form that contains the client's data. Each client can log in to his account and edit his ...
3
votes
1answer
383 views

Removing “duplicates” within a time range

I have a table that contains number plate data with a date and time stamp, collected by a plate-reading CCTV camera at a site entrance. Vehicles stopping at the site entrance will create multiple ...
5
votes
1answer
916 views

Designing a database for a site that stores content from multiple services?

I'm building a site that implements David Allen's Getting Things Done that pulls in your email, Facebook newsfeed, tweets from those you follow on Twitter, and more services are planned. The problem ...
4
votes
1answer
634 views

Database table design question

Firstly, database novice here. I'm trying to create a system for processing Sales Orders into Purchase Orders and then split the Purchase Order into Shipping Containers. The systems needs to be able ...
1
vote
0answers
11 views

What is the difference between 2 phase locking and strict 2 phase locking?

2 phase locking is used to ensure isolation of database transactions (by ensuring serializability). But there is another term called Strict 2 phase locking. I find it hard to understand the ...
2
votes
1answer
739 views

Designing a reservation system schema

I am not sure if this has been asked before, however I am tasked with designing a new reservation system for my organization We have an older system which simply stored the booking in a table, and it ...
0
votes
2answers
126 views

Make DB tables customizable from an Admin

I want to build an commercial product promotional mobile application in which the administrator of the app will be able to customize some texts / pictures or whatever from the database that ...
0
votes
0answers
16 views

Lab result table for database [closed]

I am designing a demo database for class project. I got some sample data from a clinic and I am looking for an efficient way to design a table for lab results. I found similar question on the forum ...
0
votes
3answers
463 views

Rent weekly cost database design

I have a database which contains a table BUILDING with in each row details about some building, another table BUILDING_UNIT contains rows with details about a single building unit which refers with a ...
1
vote
1answer
44 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
2answers
99 views

Dimension or Degenerate Dimension?

I am taking a course on data warehousing. Currently, I am reading through Ralph Kimball's Data Warehouse Toolkit. I understand that a degenerate dimension is a dimension key that is stored in a fact ...
3
votes
2answers
56 views

Calulating savings between two schemes

I've normalized a single table to reduce the number of nullable columns from 3 down to 0. The idea was to save a little drive space but I'm seeing a 45% decrease in space needed to store the same ...
0
votes
1answer
97 views

Complicated data

I have a requirement i got from my father. He gave me a table and wanted me to digitalis it. So that he can the system can do all the dirty jobs for him ( that's why there are developers in the world, ...
1
vote
1answer
228 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 ...
1
vote
0answers
17 views

What are my options in creating this Location table?

Say I have an Items table. Each item has a location associated to it. This location can either be a city, a state or a country. I believe this could normally be solved with a column Type in the ...
0
votes
2answers
53 views

Idea for manking tables for a pharmacy

OK I'm not into Database management, but I got this problem, also not sure if I'm posting it at the right place or not. So, my Dad works in a pharmacy and all the work there is on paper and is done ...