For example : Consider an relation R(A,B,C,D) with the following Functional dependencies:
FD1 : A BC
FD2 : B C
The above FD’s can be rewritten using decomposition rule as :
FD1 : A B
FD2 : A C
FD3 : B C
Now, using Armstrong’s Law of Transitivity i.e. if X Y, Y Z then X Z is transitively dependent and should be removed. Similarly, we will try to implement this rule in the FD’s we have. We will be left with :
FD1 : A B
FD2 : B C
Hence in this manner, transitivity can be removed.
NOTE : If a “Non-Prime” attribute is functionally dependent upon another “Non-Prime” attribute, that functional dependency will also be termed as transitive and it needs to be separated into new relation by decomposition of original relation. |
Consider the relation R(X,Y,Z,T) with the following functional dependency:
FD1 : XY Z
FD2 : Z T
Step-1 : Check whether given relation is in 2NF or not. |
Step-2 : Remove transitive dependencies from the relation and try to decompose it into a separate relations. |
XY Z (“Z” is fully dependent on candidate key “XY”)
and Z T (Z & T, both are non-prime attributes and thus forms a transitive dependency)
Now,
Splitting the whole relation into two separated relations R1(X,Y,Z) and R2(Z,T)
R1 : XY Z (Here, “XY” is the candidate key and there is no transitive dependency in this whole relation)
R2 : Z T (Here, “Z” is the candidate key and there is no transitive dependency in this whole relation)
Hence, the relation can be termed to be in 3NF, as both the relation R1 and R2 does not have any transitive dependency as well as both as are in 2NF too.
NOTE : There exists many possibilities in questions of normal forms where multiple cases of transitivity and multiple candidate keys might occur. Hence, we would recommend you to grasp the concept and try to solve as many problems as possible. We will share the question practice sheet for normal forms in the end of the chapter. |