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
0answers
20 views

Procedure Security Layer

I want discuss an idea with you and get your opinions what you think about it. From database (SQL Server 2008 R2) administration view and general security, its good practice to create DB roles and set ...
0
votes
0answers
40 views

Table with both primary key and unique key

My system requirement defines a unique business/domain/natural key (i.e. <yyyymmdd><branch_id><running_number>, in bigint). Should I use this unique key as primary key or I should ...
0
votes
1answer
93 views

Table Design for Student Attendance hourly for each day

I have created a table(attendance_details) for storing every day attendance of Students in MySQL. Need to capture attendance for hourly(1-8hrs) for every day. I have the student details in separate ...
0
votes
1answer
32 views

How to design a database for storing phone attribute?

I'm trying to capture following attributes : Name,Company,Price,Size,Weight,Release date,Gms,No of sim,Camera details,SIM details,Screen size,Screen type,Processor and Ram details and all.. Any lead ...
0
votes
0answers
11 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
41 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 ...
0
votes
0answers
25 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
112 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 ...
-1
votes
2answers
71 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
30 views

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

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
41 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
37 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
148 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
1answer
48 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
28 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
43 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
39 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
3answers
46 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
51 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
32 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
39 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
22 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
43 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? I have fallen foul of the "Enter Parameter Value" bug whereby a query pop-up shows an ...
0
votes
0answers
33 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
22 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
1answer
85 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 ...
1
vote
1answer
79 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
22 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
1answer
46 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
58 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
20 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
55 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
1answer
41 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
19 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
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
2answers
134 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
32 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
40 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
1answer
38 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
65 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
107 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
17 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
88 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) ...
3
votes
1answer
80 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
52 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
50 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
34 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
40 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
43 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
75 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 ...