Consider relation R = (A, B, C, D, E, F) and a set of functional dependencies:
AB --> C
BC --> A
BC --> D
D --> E
CF --> B
What are all the candidate keys?
Please if anyone can give me the answer and explain how.
Consider relation R = (A, B, C, D, E, F) and a set of functional dependencies:
AB --> C
BC --> A
BC --> D
D --> E
CF --> B
What are all the candidate keys?
Please if anyone can give me the answer and explain how.
Let me explain how to find candidate keys in a simple manner:
Form a three columns,left,right and middle
In left column,add the attributes which appear only on left hand side of FD
In right column,add attributes which appear only on right hand side of FD
In middle column,add attributes which appear both on right and left hand side of FD
Explanation:
Attributes on left column indicates,every possible candidate keys must include these attributes
and
Attributes on right column indicates candidate keys should not include it
and
Attributes on middle may or may not be included in super keys
In the given example,F is placed in left column and A,B,C,D are placed in right column and E is placed in right column
Then,apply Closure property,
AF+->AF reflexivity rule
BF+->BF reflexivity rule
CF+->ABCDEF
because
CF->CF reflexivity rule
CF->B given
CB->A given
CB->D given
CB->A transitivity rule CB->D and D->A
Thus,CF->ABCDEF and CF is the candidate key
Hope,this helps!
I hope this will help you finding the candidate key for this answer .
As per my analysis candidate key for these functional dependencies are :
AB, BC, ABC, ABD, BCD, ABCD