Home » Database » Database miscellaneous » Question

Database miscellaneous

  1. Consider the relation scheme R = (E, F, G, H, I, J, K, L, M, N) and the set of functional dependencies {{E, F} → {G}, {F} → {I, J}, {E, H} → {K, L}, {K} → {M}, {L} → {N}} on R.
    What is the key for R?
    1. {E, F}
    2. {E, F, H}
    3. {E, F, H, K, L}
    4. {E}
Correct Option: B

We know that K is a key for Relation schema R it K → R; i.e. K functionally determines each & every attribute of R. This is definition off key using functional dependency.
Now, the Given Relation-Schema is R (E, F, G, H, I, J, K, L, M, N) and the Given functional dependencies :
{E, F} → {G}    (i)    {K} → {M}    (iv)
{F} → {I, J}    (ii)     {L} → {N}    (v)
{E, H} → {K, L}    (iii)
Now we need to find function dependency whose right side is R.
(a) {E, F} Cannot be a key as it determines only ‘G’
(b) {E, F, H} is a key:
⚈ using Transitivity on (i) and (ii) we get
{E, F} → {G, I, J} .......(vi) ·
⚈ using preudotransitivity on (iii) and (vi) we get
{E, F, H} → {G, I, J, K, L} ........(vii)
⚈ using Decomposition on (vii) we get
{E, F, H} → {K} and {E, F, H} → {L}
Combining above with (iv) and (v) respectively
{E, F, H} → {M} and {E, F, H} → {N}
Now, finally performing union of these with (vii) we get:
{E, F, H} → {G, I, J, K, L, M, N} ...........(viii)
Also {E, F, H} → {E, F, H} is trivial, combine this with (viii) using union, we get:
{E, F, H} → {E, F, G, H, I, J, K, L, M, N}
⇒ {E, F, H} → R
So, {E, F, H} is a key of R.
(c) {E, F, H, K, L} is a super key but not a key since it is not minimal (i.e. contains extra attributes)
& (D) {E} cannot be a key of R clearly.



Your comments will be displayed only after manual approval.