Third normal form is a normal form used in database normalization. Third normal form eliminates transitive dependencies of non-key attributes on the primary key.
3NF is strictly weaker than BCNF. The difference is that 3NF permits a non-trivial FD
The advantage of 3NF over BCNF is that it is always possible to find a decomposition into 3NF that is both loseless and dependency-preserving, which is not always achievable for BCNF.
A schema is in third normal form if for every non-trivial functional dependency
Equivalently, a schema is in 3NF if it is in 2NF and no non-prime attribute is transitively dependent on any candidate key.
A transitive dependency exists when
Consider a schema Student(StudentID, Department, DepartmentHead) with the following functional dependencies:
StudentID DepartmentDepartment DepartmentHeadThe only candidate key is {StudentID}.
This schema is in 2NF (the key is a single attribute, so partial dependencies are impossible), but it is not in 3NF because DepartmentHead is transitively dependent on StudentID through Department:
Here Department DepartmentHead violates 3NF because Department is not a super key and DepartmentHead is not a prime attribute.
To bring it into 3NF, we decompose into:
Student(StudentID, Department)Department(Department, DepartmentHead)