Relational Model Normalization
Relational Model Normalization
Relational Model
(Normalization)
Chapter 4:
Logical Database Design & the Relational Model,
Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden
TODAY'S LECTURE: OBJECTIVES
2
NORMALIZATION
3
DATA NORMALIZATION
4
WELL-STRUCTURED RELATIONS
A relation that contains minimal data redundancy
and allows users to insert, delete, and update rows
without causing data inconsistencies
Goal is to avoid anomalies
Insertion Anomaly–adding new rows forces user to
create duplicate data
Deletion Anomaly–deleting rows may cause a loss of
data that would be needed for other future rows
Modification Anomaly–changing data in a row forces
changes to other rows because of duplication
6
ANOMALIES IN THIS TABLE
Insertion–can’t enter a new employee without having
the employee take a class
Deletion–if we remove employee 140, we lose
information about the existence of a Tax Acc class
Modification–giving a salary increase to employee
100 forces us to update multiple records
8
FUNCTIONAL DEPENDENCIES AND KEYS (CONT…)
10
PRELIMINARY TO NORMALIZATION
Sample data should be recorded in the rows of the table, including any
repeating groups that are present in the data.
Table with multivalued attributes, not in 1st normal form
13
Table with no multivalued attributes and unique rows, in 1st
normal form
16
Functional dependency diagram for INVOICE
17
Therefore, NOT in 2nd Normal Form
REMOVING PARTIAL DEPENDENCIES
18
Removing partial dependencies
Getting it into
Second Normal
Form
20
Removing partial dependencies
Getting it into
Second Normal
Form
Getting it into
Third Normal
Form
23
RELATIONAL SCHEMA FOR INVOICE DATA
(MICROSOFT VISIO NOTATION)
24