For the following relations, do the following:
a) What are all the nontrivial FD’s that follow from the given FD’s? You should restrict yourself to FD’s with single attributes on the right side.
b) What are all the keys of R?
c) What are all the superkeys for R that are not keys?
i) S(A, B, C, D) with FD’s A --> B, B --> C, and B --> D.
ii) T(A, B, C, D) with FD’s AB --> C, BC --> D, CD --> A, and AD --> B.
i)
The non trivial Functional Dependency are :
A -> C
A -> D
Take closure of A : A+ = {A, B, C, D}
Therefore primary key for the given relation is {A}
All the super keys possible are:
(AB) (AC) (AD) (ABC) (ABD) (ACD) (ABCD)
Super keys are formed by adding non key attributes to keys.
ii)
The non trivial functional dependency is
AB -> D
AD -> C
BC -> A
CD -> B
ABC -> D
BCD -> A
CDA -> B
Take closure of AB : {AB}+ = { A, B, C, D}
{BC}+ = {B, C, D, A}
{CD} + = {C, D, A, B}
Therefore keys for the given relation is (AB) (BC) (CD)
The superkeys on the given relation are
(ABC)
(ABD)
(BCD)
(CDA)
If you have any questions comment down. Please don't simply downvote and leave. If you are satisfied with answer, please? upvote thanks
Get Answers For Free
Most questions answered within 1 hours.