Professional Documents
Culture Documents
Database Design
Requirements Analysis
Conceptual Modeling (ER Model)
Logical Modeling (Relational Model)
Schema Refinement (Normalization)
9/24/2011
Database Design
Redundancy
Schema Refinement
Minimizing Redundancy
Functional Dependencies (FDs)
Normalization using FDs
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Boyce-Codd Normal Form (BCNF)
9/24/2011
Redundancy
Same information appears at many places in the DB
Problems:
Wastage of Space
Update Anomalies
Update Anomaly
Insert Anomaly
Delete Anomaly
Normalization is done for minimizing redundancy
9/24/2011
Redundancy
9/24/2011
Anomalies
Instructor( Instr_ID, Instr_name, Course, Credit)
Redundacy: Same course can be taught by several instructors, each time the
credit for such course is repeated
Update Anomaly: Update information that DBMS from Semester I, 20082009 is 5 units course
Insert Anomaly: Cannot insert a new course credit unless an instructor is
assigned to it
9/24/2011
Wages R W
Example (Contd.)
8 10
Hourly_Emps2 5 7
S
123-22-3666 Attishoo
231-31-5368 Smiley
Problems due to R
W:
Update anomaly: Can
131-24-3650 Smethurst
we change W in just
434-26-3751 Guldu
the 1st tuple of SNLRWH?
612-67-4134 Madayan
Insertion anomaly: What if
we want to insert an
S
N
L
employee and dont know the
123-22-3666 Attishoo
48
hourly wage for his rating?
Deletion anomaly: If we
231-31-5368 Smiley
22
delete all employees with
131-24-3650 Smethurst 35
rating 5, we lose the
information about the wage 434-26-3751 Guldu
35
for rating 5!
9/24/2011
612-67-4134 Madayan
R H
48 8 40
22 8 30
35 5 30
35 5 32
35 8 40
R W
10 40
10 30
30
32
35 8
10 40
8
Solution
Decompose the relation:
9/24/2011
10
Functional Dependency
9/24/2011
11
Functional Dependencies
9/24/2011
12
9/24/2011
13
9/24/2011
14