Oe Unit 3
Oe Unit 3
NORMAL FORMS
• Definition:
A table is in 1NF if it contains only atomic (indivisible) values — no multiple values
in a single cell, and each record is unique.
• Type of Dependency:
o Atomicity
o No multivalued attributes
• Example:
Not in 1NF:
• In 1NF:
1 John Math
1 John Science
• Definition:
A table is in 2NF if:
• Type of Dependency:
• Example:
Not in 2NF:
(Primary Key: StudentID, CourseID)
| StudentID | CourseID | StudentName |
In 2NF:
o Student Table:
| StudentID | StudentName |
o Course Table:
| CourseID | CourseName |
o Enrollment Table:
| StudentID | CourseID |
• Definition:
A table is in 3NF if:
o It is in 2NF, and
• Type of Dependency:
o No Transitive Dependency
• Example:
Not in 3NF:
| StudentID | StudentName | Department | HODName |
In 3NF:
o Student Table:
| StudentID | StudentName | Department |
o Department Table:
| Department | HODName |
• Definition:
A stricter version of 3NF.
A table is in BCNF if every determinant is a candidate key.
• Type of Dependency:
o No Partial
o No Transitive
• Example:
Not in BCNF:
| Professor | Subject | Department |
(Professor teaches one Subject, but Subject is assigned to only one Department.)
Dependencies:
o Professor → Subject
o Subject → Department
In BCNF:
o Professor Table:
| Professor | Subject |
o Subject Table:
| Subject | Department |
• Definition:
A table is in 4NF if:
o It is in BCNF, and
• Type of Dependency:
o Multivalued Dependency
• Example:
Not in 4NF:
| StudentID | Course | Hobby |
(A student can enroll in many courses and have many hobbies independently.)
In 4NF:
o Student-Course Table:
| StudentID | Course |
o Student-Hobby Table:
| StudentID | Hobby |
• Definition:
A table is in 5NF if:
o It is in 4NF, and
o Every join dependency is a result of candidate keys (decomposition must be
lossless).
• Type of Dependency:
o Join Dependency
• Example:
Not in 5NF:
(In a table storing Teacher, Subject, and Class combinations)
In 5NF: