Chapter 5: Database Normalization
Chapter 5: Database Normalization
Normalization Process
Identify the existence of potential problems,
known as the update anomalies
Tables must be types of normal forms:
FIRST NORMAL FORM (1NF)
SECOND NORMAL FORM (2NF)
THIRD NORMAL FORM (3NF)
FOURTH NORMAL FORM (4NF)
FUNCTIONAL DEPENDENCE
KEYS
FUNCTIONAL
DEPENDENCE
A column is FUNCTIONALLY DEPENDENT on another
column when each value in the second column is
associated with exactly one value in the first column.
Customer Table
Is CustomerName functionally dependent on
RepNum?
OrderLine Table
Is Quoted price functionally dependent on
OrderNum?
KEYS
A column is PRIMARY KEY if:
All columns in the table are functionally dependent on that
column
If its concatenated key, no other concatenation of fields or
single field would fulfill the same purpose.
?
S
Y
E
K
E
T
A
D
I
D
N
A
C
E
R
A
T
A
H
W
UPDATE ANOMALIES
UPDATE
INCONSISTENT DATA
ADDITIONS
DELETIONS
DEPENDENCY DIAGRAM
Example of a
Determinant:
Customers
First and Last
Names are
determined
by the
RepNum
See RepNum
20
Incorrect Decomposition
Data Redundancy
Always link the Primary Key to the Foreign Key not the
Dependant Data
E.g.: Link the CustomerNum to the RepNum not
First/LastName
Lets See Figure 5.13 and 5.14
Multivalued Dependencies
When the data in the first column is related
to data in the second column AND is related
to data in the third column BUT its
relationship to the data in third column is
independent of its relationship in the second
column
PROBLEMS:
1.Update
Problems
2.Addition/Deletio
n Problems