DBS Normalization
DBS Normalization
ARUSHA
DATABASE SYSTEMS
NORMALIZATION
WHAT IS NORMALIZATION
• Normalization is a design technique that is
widely used as a guide in designing relational
databases
• Normalization theory is based on the concepts
of normal forms.
• The process of converting un-normal to
normal form.
PROBLEMS OF UN-NORMALIZED FORMS
Jim Alan
in INF
Manager Subordinate
Bob Jim
Bob Mary
Bob Beth
Mary Mike
Mary Jason
Mary Carol
Mary Mark
Jim Alan
Second Normal Form
• Tables with composite primary keys can be in
1NF but not in 2NF.
• A relational table is in second normal form
2NF if it is in 1NF and every non-key column is
fully dependent upon the primary key.
• That is, every non-key column must be
dependent upon the entire primary key.
• Examine relation of non-PK to PK
In NF but not in 2NF
Functional Dependence in table first
• FIRST is in 1NF but not in 2NF because status
and city are functionally dependent upon only
on the column s# of the composite key (s#,
p#).
• This can be illustrated by listing the functional
dependencies in the table:
s# —> city, status
(s#,p#) —>qty
Anomalies in first (previous) table
• INSERT. The fact that a certain supplier (s5) is located
in a particular city (Athens) cannot be added until
they supplied a part.
• DELETE. If a row is deleted, then not only is the
information about quantity and part lost but also
information about the supplier.
• UPDATE. If supplier s1 moved from London to New
York, then six rows would have to be updated with
this new information.
transforming a 1NF table to 2NF