In: Computer Science
Show that every schema consisting of exactly two attributes must be in BCNF regardless of the given set F of functional dependencies.
Solution:
Explanation:
BCNF:
=>A relation is called in BCNF if every functional dependency of relation is of type X -> Y where X is super key.
Proving relation with exactly two attributes in BCNF:
=>Let say two attribute are A and B so there can be 4 cases of functional dependencies.
(i) Only A -> B functional dependency is present.
=>If A -> B functional dependency then A is super key because it can derive both the attributes A and B hence it is satisfying BCNF.
(ii) Only B -> A functional dependency then B is super key because it can derive both the attributes A and B hence it is satisfying BCNF.
(iii) There is no functional dependency in relation R(A, B).
=>If there is no functional dependency then relation is in BCNF because it is not voilating functional dependency rule.
(iv) Both non trivial functional dependencies A -> B and B -> A are present in the relation R(A, B) then A and B are superkeys hence is it satisfying BCNF.
=>Hence on the basis of above statements we can say that relation with exactly 2 attribute is always in BCNF.
I have explained each and every part with the help of statements attached to it.