Normalization
Normalization
A → A, B → B
Non-trivial functional dependency
• A → B has a non-trivial functional dependency if B is not
a subset of A.
• Example:
– Relation EMPLOYEE is not in 1NF because of multi-valued
attribute EMP_PHONE
Employee
Table
Second Normal Form (2NF)
• In the 2NF, relational must be in 1NF.
Teachers Table
Second Normal Form (2NF)
• In the given table, non-prime attribute TEACHER_AGE is
dependent on TEACHER_ID which is a proper subset of a
candidate key.
Teachers Table
TEACHER_DETAIL table
TEACHER_SUBJECT
table
Third Normal Form (3NF)
• A relation will be in 3NF
– it is in 2NF and
– not contain any transitive partial dependency.
EMPLOYEE_DETAIL
table
Third Normal Form (3NF)
• Super key is {EMP_ID}, {EMP_ID, EMP_NAME}, {EMP_ID,
EMP_NAME, EMP_ZIP} . . .
• For BCNF, the table should be in 3NF, and for every FD,
LHS is super key
Rules for BCNF
• it should satisfy the following two conditions:
• For a dependency A → B,
– For a single value of A, multiple values of B exists, then
– The relation will be a multi-valued dependency.
Rules for 4th Normal Form
• For a table to satisfy the Fourth Normal Form, it should
satisfy the following two conditions:
• Do not know about the subject and who will be taking that subject so
we leave Lecturer and Subject as NULL.
• But all three columns together acts as a primary key, so we can't leave
other two columns blank.
• So to make the above table into 5NF, we can decompose it into three
relations P1, P2 & P3:
Fifth normal form (5NF)
• To make the above table into 5NF, we can decompose it
into three relations
Thank You