An Example of Database Normalization (Cont.)
Third Normal Form (3NF)
This normal form speaks about transitive dependency.
A database relation (a database table) is said to meet third normal form standards if all the attributes (database columns) are functionally dependent on solely the primary key.
That is 3NF is a relation in second normal form where all non-prime attributes depend only on the candidate keys and do not have a transitive dependency on another key.
This says that we should remove transitive dependency if they are exist.
What is transitive dependency?
It is a condition such as in Student
relation, StudentCode
determines the Town
(StudentCode→Town
) and Town
determines the Province
(Town→Province
), therefore StudentCode
determines Province
(Note that, as per this relation StudentCode
detemines Province
but the issue is it can be determined by Town
too).
In other words, if you see that Attribute A
determines B
(A→B
) and B
determines C
(B→C
), then A
determines C
(A→C
).
For removing transitive dependency, we need to decompose the relation.