Normalization: Database Normalization Was First Proposed by Edgar F. Codd
Normalization: Database Normalization Was First Proposed by Edgar F. Codd
• Eliminate redundancy
• Organize data efficiently
• Reduce the potential for data anomalies.
Objective of Normalization
“to create relations where every dependency is on the key, the whole key,
and nothing but the key”.
Also,
any relation that is in BCNF, is in 3NF;
any relation in 3NF is in 2NF; and
any relation in 2NF is in 1NF.
Normalization
X Y holds if whenever two tuples have the same value for X, they must
have the same value for Y.
If t1[X]=t2[X], then t1[Y]=t2[Y] in any relation instance r(R)
EmpNum DeptNum
DeptNum DeptName
Each table has a primary key: minimal set of attributes which can
uniquely identify a record.
• 2NF (and 3NF) both involve the concepts of key and non-key attributes.
• A key attribute is any attribute that is part of a key; any attribute that is not a
key attribute, is a non-key attribute.
The requirements to satisfy the 2nd NF:
Students table
Student# AdvID AdvName AdvRoom
123 123A James 555
124 123B Smith 467
Registration table
Student# Class#
123 102-8
123 104-9
124 209-0
124 102-8
3rd Normal Form
BCNF is stricter than 3NF. A table complies with BCNF if it is in 3NF and for
every functional dependency X->Y, X should be the super key of the table.
To make the table comply with BCNF we can break the table in three tables like
this:
emp_nationality table:
emp_id emp_nationality
1001 Austrian
1002 American
emp_dept table:
emp_id emp_dept
1001 Production and planning
1001 stores
1002 design and technical support
1002 Purchasing department
References
• Hillyer Mike, MySQL AB. An Introduction to Database Normalization,
http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html, accessed
October 17, 2006.