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
9 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 ...
1
vote
0answers
25 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
0answers
21 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 ...
0
votes
1answer
15 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 ...
3
votes
2answers
126 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
35 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
20 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
34 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 ...
-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 ...
2
votes
1answer
33 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 ...
0
votes
0answers
9 views

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

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
3answers
30 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
0answers
44 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
1answer
28 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
1answer
27 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
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
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
0answers
10 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 ...
0
votes
0answers
14 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 ...
1
vote
1answer
42 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 ...
0
votes
0answers
34 views

Why to separate DDL from DML? [closed]

I have a very basic question about DMS I want to ask why we separate DDL and DML into different languages and in general why Database creation tools is different from data manipulation and control ...
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 ...
-1
votes
0answers
22 views

DBMS Project (SRS to ERD mapper) [closed]

suppose you a are a IT profession & you have a final year project a specific format provided in which user put requirement in the form of paragraph & click generate button to ER diagram. My ...
0
votes
1answer
17 views

Which one is best solution for future database structure?

I'm working on a big web application. so i need to create user_preference_table it has the marks for every users for each attributes. here attributes are games so in the user_preference_table i need ...
1
vote
2answers
54 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
1answer
19 views

Help me define the tables in this scenario

We have 2 tables setup like this: WEB_GK_STATE PRG_CODE Varchar2(5) STATE Varchar2(2) WEB GK PRG_CODE Varchar2(5) TEXT Varchar2(4000) Here is some sample data: ...
0
votes
1answer
42 views

Normalising Customers and Employers with a people table

At what normalisation stage is it recommend to split say Customers and Employees into a people table and then link to the unique attributes of Customers and Employees. I cant seem to find the ...
0
votes
0answers
22 views

Uber-wide tables: Time to switch to Mongo?

As a web developer, I've typically only worked with nice, normalized tables in SQL-based RDBMS, but I'm doing some data consolidation for a researcher who will be analyzing correlations between all ...
0
votes
0answers
18 views

Advice for a friendship table

For my little project I would like to create a very simple friendship system. And I would like someone to give me some advice/criticise the current design I have. Here is an example of my friend ...
0
votes
2answers
24 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
2answers
122 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 ...
1
vote
0answers
14 views

Good way to store daily train data in MongoDB

I am preparing to collect large amounts of information about trains in my country. Each train in my country has a number. I've already collected all of these numbers. There are about 4000 of them. ...
0
votes
0answers
17 views

School fees database design

I am trying to design a database for a school fee management system. The school is charging some Admission fees , Security for one time but development fund, registration fund on annual basis. but ...
0
votes
0answers
22 views

How to model a relation between table data and table layout?

Hey there professionals, I have a quite nasty modeling problem that I think may also be part of a general design decision issue that I am obliged to solve. I did not do much modeling before and my ...
0
votes
1answer
18 views

About schema design of NoSQL DB.(How to query multiple data?)

I just got a requirement, to build a web only with Redis. Data of the web is something like this(I write as RDBMS): User Info: user_id,first_name,last_name,age,..... Address: ...
0
votes
2answers
46 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 ...
0
votes
2answers
52 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 ...
0
votes
0answers
13 views

How to model a type that's related to one of a number of other types

A generic data modeling question: How would one model the database tables in a case in which an entity of Type A is related to one entity of either Type B or of Type C (but not both). For bonus ...
0
votes
4answers
66 views

What is a DB Link good for?

Here is defined what a DBLink is but I really understand for what kind of situations you need it? What I could imagine is a situation where I have a limited (in size like sql-server express) ...
2
votes
1answer
49 views

How do completely empty columns in a large table affect performance?

I have 400 million rows in a Postgres db, and the table has 18 columns: id serial NOT NULL, a integer, b integer, c integer, d smallint, e timestamp without time zone, f smallint, g timestamp without ...
0
votes
2answers
44 views

One-To-One relation is this a good practice?

I have a table "Place" (id_place, name, address,coor_x, coor_y) I would like to add for a place their "facebook page" "twitter page" "wesbite" and telephone My first idea was to create a table let's ...
0
votes
0answers
25 views

Credit Card database schema

I am not very good in database design so please if you can help me with this. I want to know what will be the best way to store it in mysql database Here is the selection I want as final Select ...
0
votes
1answer
18 views

How to define the table structure for measured data in sqlite

I have an embedded system with an sqlite database. How should I define the table structure for the measured data from 4 sensors? Each sensor give us every second an numeric measured value. The ...
0
votes
2answers
34 views

Design of MySQL

My supervisor asked to design a database by using MySQL. This database is used to store information about evaluation surveys. The survey has a lot of questions, and each question has 5 choices, the ...
0
votes
1answer
26 views

PostgreSQL function thinks table reference exists when it does not

So I run this query: SELECT f_copy_tbl('parts','parts1'); ...while working on code based off of this answer and I get this error message: ERROR: relation "parts1" already exists pgAdmin III ...
1
vote
1answer
61 views

Multi table GROUP BY query optimisation

Currently I have a multi table/column GROUP BY query which is pretty slow. Below is the tables schema used by the query: report Table ...
0
votes
2answers
92 views

One MySQL Database or Many MSSql Databases

At the moment I have an in-house Access database, data stored by our online survey provider, and data stored by our project management provider, both in databases. What I want is an in-house database ...
0
votes
0answers
13 views

Assigning items to containers

I have two tables for separate things: One table for containers, one table for items. They both have things like descriptions, title, and of course ID fields: container_ID and item_ID. My containers ...
1
vote
0answers
28 views

Implementing a consistent mailbox

I am trying to implement something like a mailbox for short messages between users. I am using Postgresql 9.4.1 with SQLAlchemy (Python3). There is a table of users: users = Table('users',metadata, ...