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
17 views

Confused about Primary Keys, and Foreign Keys

Im brand new to database design and, I'm slightly confused about Primary Keys, and Foreign Keys and my database design. Context: I'm working on a database of museums and Categories will be one way ...
0
votes
0answers
17 views

Trying to map postal codes to their respective cities, but running into some issues

The Problem I am creating a database of Countries, Regions, Cities and Postal Codes. Here's an example to give an idea of the database structure as it is now: Now, let's take Tuskegee University ...
0
votes
1answer
24 views

Database design: Which will perform better, auto incremented column or a composite key for appointments

The schema of table is : appointment(date,time,patientID,...) pateint(patientID,PName,age,...) PS: two or more patient can came at the same time . The number of appointments per day up to 500 . ...
-3
votes
0answers
29 views

What softwares are found in DB systems [on hold]

I am new to database concept and application. I want to know what softwares exist in a whole database system?
0
votes
2answers
22 views

Copy database from one mysql sever to another mysql server

Following are the details of the database and server: Server1: Host Name: abc Port Num: 01 database: test Server2: Host Name: xyz Port Num 02 database: spareparts userid: spts password: abcdefgh@123 ...
0
votes
1answer
38 views

No-SQL Datebase Design for restaurant app

I've been working with SQL Datebases all my life and I am now trying to get into No-SQL world. I am a looking for a piece of advice on whats the best practice in order to achieve this. Suppose I have ...
1
vote
2answers
52 views
+150

Don't know how to transform variable entity into relational table

INTRODUCTION AND RELEVANT INFORMATION: The following example illustrates the problem I face: Animal has a race, which can be a cat or a dog. Cat can be either Siamese or Persian. Dog can be a German ...
0
votes
2answers
41 views

One field with multiple values?

I know that what I'm asking can't be done or shouldn't be done, but I really don't know how to do it. This is the problem: 2 tables: - Drivers (id_driver, name, etc...) - Trucks (id_truck, model, ...
1
vote
1answer
26 views

How to Choose an SQL Database for Simple Data Preparation & Analytics

In the interests of not making this a shopping list: please advise on "how" to choose a the right tool, as opposed to which is the best. E.g: Which questions should I be asking myself / client? What ...
1
vote
3answers
358 views

Which one is better performance and (approach): store as rows or as a varchar column

OptionA: TableA: TableA_ID (PK,int) .. TableB: TableB_ID (PK,int) .. TableC: TableC_ID (PK,int) .. TableD: TableA_ID (FK, int) TableB_ID (FK, int) TableC_ID (FK, int) (Nullable) ...
0
votes
5answers
79 views

Database with only text fields

I started working on an existing SQL Server Database System in which most of the fields are stored as text. Except some IDs all fields are varchar (phone numbers, zip codes, Dates, addresses, monetary ...
-5
votes
0answers
44 views

Roomwise track of beds sql server table design [closed]

Well I am bit confused. I am a new student of SQL database. Today, I conceived of a system to track accommodation status in my hostel. I do not know how to plan the database field and constraints - ...
-1
votes
2answers
42 views

How is SQL used from an end-user perspective? [closed]

So I've been learning database manipulation and design and using SQL, but surely a secretary of a company wouldn't be using SQL to directly enter things into the database, so how does that work? For ...
11
votes
5answers
1k views

Why does a UNIQUE constraint allow only one NULL?

Technically, NULL = NULL is False, by that logic no NULL is equal to any NULL and all NULLs are distinct. Shouldnt this imply that all NULLs are unique and a unique index should allow any number of ...
0
votes
0answers
30 views

DB Model for Small requiremnt [closed]

I have created below DB model. Could you please validate if this is proper. This is restaurant app where waiter takes order and gives it to chef.Before placing order she does have information of ...
2
votes
4answers
72 views

Can't finish my ER diagram

I am trying to create a database for a small book library. This is not a professional project, just an exercise of my own. This is my first time to try this ( I am self-taught ) and I am encountering ...
1
vote
3answers
32 views

Study material for Advanced Databases module inc SQL, Relational Model, ERM & TM [closed]

For my next module in my masters, I am planning on studying Advanced Databases. (Long story short, the masters is designed for people with NON-CS degrees, so I have never studied databases, therefore ...
-2
votes
1answer
35 views

Oracle Concurrent Insertion

We have simple case like Create table t1 (c1 number primary); session1: insert into t1 values (1); //session1 do not commit transaction session2: insert into t1 values (2); Will Session2 ...
0
votes
1answer
50 views

A question regarding the performance of normalization

I am sorry this is such a newb question, but it is one thing I am having a difficult time wrapping my mind around, and after an evening spent reading I finally just decided to ask for some ...
1
vote
0answers
35 views

triggers vs views [closed]

I have a mysql database with the following tables Penalties Scores player_instance When penalties is updated/deleted then it will update scores (via a trigger). Also when a player-instance row is ...
1
vote
0answers
19 views

Multidimensional aggregates

Suppose one wanted to cache simple aggregate data over a table or grouped parts of a table, one could simply make a table with the aggregated results. If the original table is only appended to, it is ...
0
votes
1answer
32 views

Should there be a temporary table to hold Order and OrderItems? [closed]

After trying out a few open-source restaurant POS, I still couldn't decide if there should be a temporary to hold Orders and OrderItems? I was initially thinking to have temporary tables and ...
1
vote
1answer
56 views

How to design tables such that a person can work for many companies? [closed]

Database design such that a person can work for many companies?
2
votes
2answers
46 views

Best practice design when expecting large data in a table

I have come across a way that kind of works for me, and was just wondering if it would have any side effects, or, if I'm just thinking about this the wrong way. I first had this idea when I was ...
1
vote
1answer
24 views

Saas MySQL Multiple Databases or One Database [closed]

I am using MYSQL so Database is the Schema, sorry if not using right terminology. I currently have a Saas product which has multiple databases one for each client with a main databases which we ...
0
votes
1answer
25 views

Does the creation of constraints affect the views that have been created earlier?

Does the creation of constraints(foreign key) affect the views that we have created earlier? create view allreservations (fno, customer) as SELECT f.flight_number, customer_number FROM flight f, ...
1
vote
1answer
31 views

Question about the workflow/design process/tools used by professional database designers

I hope this in the right place, as it's really more a question about database design software than the philosophy and practise of database administration. I'm a masters student doing an "introduction ...
0
votes
2answers
24 views

about giving same column name in every table of database

I have a database with 5 tables. In every table there is a column for checking status. If i give the name to that column which is same in all the 5 tables; What will happen? Is it correct according ...
0
votes
0answers
11 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
31 views

How to select column names that contains specific value from other table's column

Suppose I have table items and logs. Both tables have col1, col2, col3, col4... col(n). col1.. col(n) in table items simply specifies key name (col1 = "beef", col2 = "chicken", col3 = "bacon") ...
0
votes
1answer
35 views

Postgres table contains 1 column, and that column is PK. How to insert new record?

In my application, I have an abstract base class, and 2 derived classes. The number of derived classed will probably not increase. If it does, it won't be more than a few. The class structure looks ...
0
votes
1answer
33 views

ERD Design for Employee Leave

I found the following ERD design: Which trying to capture as much information about employee leave (i.e sick, travel, etc). What am trying to understand is what does the columns: Table : ...
1
vote
1answer
12 views

Schema Design Inquiry

In a timesheets data model, suppose I have an employee table, and a job table. Then, I also have an employeeInJob table to store an employee's rate for a given job e.g. employeeInJob ( ...
1
vote
2answers
60 views

Help in designing mysql table for large project

I am planning to create a website which allows different Companies to register in it. It will have Employees module. Each company will have a CompanyId. How do I maintain the Employees table, since in ...
0
votes
0answers
23 views

Two types of rows with mutual fields and unique fields

I have a question about DB design. (MySQL) In my website, users can leave reviews for Stores and Products. Right now, there's a table for stores and a table for products. Each item ('item' = either ...
0
votes
2answers
32 views

Design a Lab Report tables [closed]

I need to design tables for a laboratory test. I will have Lab test name, and its component to be saved. The component can be changed with time. I need to design a UI for update. Also each ...
0
votes
1answer
31 views

How do I organize tables for simple lottery game? mysql [closed]

I am building a simple lottery web game that will let users pick a number that is in between that weeks given range. A number will be randomly select to determine the winner. I have a table for users ...
0
votes
2answers
38 views

How to configure Standby database in oracle for read/write

I have configured a physical standby database in Oracle 11gR2, and the standby database it's working fine. All the changes in the principal database are replicating to the standby database, the ...
1
vote
1answer
35 views

Database setup for datalogging

We're currently starting to build a version 2 of our system and one of the things we've noticed with version 1 is that we'll have quite a bit of data so we started to rethink our approach to how to ...
1
vote
1answer
39 views

Tables names in a supertype/subtype schema

I have 3 types of users in my app. The users share some common attributes, but they also have quite a bit of stuff that pertains uniquely to each user type. I have a person table that contains limited ...
0
votes
0answers
17 views

Merge colums from two different databases using phpMyAdmin

Is there a way to: Replace all the data from database1 > table1 > column2 With Data from Database2 > table1 > column2 ONLY under the condition that the ID value in database1 > table1 > column1 ...
2
votes
0answers
24 views

CouchDB and document versioning

I'm currently working on a wiki-esque application using CouchDB and am trying to implement a document versioning scheme. The way I see it there are two ways of doing this: Store each version as a ...
1
vote
0answers
54 views

How to represent directed graph with multiple parents?

http://dirtsimple.org/2010/11/simplest-way-to-do-tree-based-queries.html provides an algorithm for inserting and deleting from a Closure Table. I'd like to model a similar data structure, except that ...
1
vote
2answers
53 views

Unique column values between tables

I'm keeping track of teams and their members. Each team has one leader, one contact person, and any number of players, and each of them has a unique email address. The problem is that one physical ...
3
votes
2answers
52 views

I have this two models, which one is better?

what is a better design?? Model 1: +------+ +--------+ | type |-|--+ | Data | +------+ | +--------+ | id | | | Mach ID| | type | | | Time | | len | ...
0
votes
1answer
27 views

Is it possible to create this type of database for a massive forum? [closed]

Kind of like how craigslist you select a state, then a city, and you're in that community. How do I make my forum website's home page have 2 drop menus for a state and city, then it would bring the ...
0
votes
0answers
13 views

Handle a Search on 2 Big Tables

Hello i want to realize a exchange system with 2 tables. 1 Table for "the user is looking for" 1 Table for "the user has to share" the Tables are very simple id bigint user_id bigint object_id ...
1
vote
1answer
103 views

Database design for an online babyShop ,Toy shop

Hi i'm designing a database for a toy shop this shop offer many products with different categories. boystoys,girlstoys,puzzles,beds,stroller, etc i designed my database as it is consists of 5 tables ...
2
votes
1answer
34 views

Supertyping Inventory Transactions

I am trying to wrap all interactions with inventory items into one transactional table. Currently I calculate QoH by querying multiple fact tables (production, acquisition, shipment, return order, and ...
0
votes
1answer
50 views

Database design : hotel room and its detail

Right now i'm creating DB schema for a hotel. I stumbled upon on my hotel rooms table design. The requirement of hotel rooms would have data like : columns like room_type, room_size, room_number. ...