Presentation is loading. Please wait.

Presentation is loading. Please wait.

Decomposition and Normalization Fan Qi

Similar presentations


Presentation on theme: "Decomposition and Normalization Fan Qi"— Presentation transcript:

1 Decomposition and Normalization Fan Qi fan.qi@nus.edu.sg

2 Anomalies in Database Design Insertion Anomaly – Certain facts cannot be inserted Update Anomaly – Update a fact causes changes in multiple places Deletion Anomaly – Delete a fact cause deletion of other facts Faculty IDFaculty NameOfficeHire DateCourse Code 389Dr. GroveCom1 03-0410-Feb-1985CS 433 407Dr. SapersteinCom2 02-0519-Apr-1999CS 101 407Dr. SapersteinCom2 02-0319-Apr-1999CS 202 591Dr. NewsomeCom2 02-1730-Oct-2015 No course assigned, cannot insert Update Office Cause Inconsistency Delete CS433 affect entire row

3 Normalization Organizing columns and tables to minimize data redundancy – So the anomalies are resolved Normal Forms: – 1NF No set values Key must exists (no duplicate rows) – 2NF No non-prime attribute is dependent on part of any keys – 3NF Non-prime attributes are dependent only on the key – BCNF Every attribute is dependent only on the key

4 Normalization

5 Decomposition

6 3NF Decomposition

7

8 BCNF Decomposition

9

10 Final Notes [1] http://ecomputernotes.com/database-system/rdbms/third-normal-form


Download ppt "Decomposition and Normalization Fan Qi"

Similar presentations


Ads by Google