In: Computer Science
Consider a relation R (ABCDEFGH) with the following functional dependencies:
ACD --> EF
AG --> A
B --> CFH
D --> C
DF --> G
F --> C
F --> D
Find minimal cover and identify all possible candidate keys. In order to receive full credit, please list each step taken and the rules that you applied.
Solution:
Given,
=>Relation = R(ABCDEFGH)
=>Set of functional dependencies = {ACD -> EF, AG -> A, B -> CFH, D -> C, DF -> G, F -> C, F -> D}
Explanation:
Finding minimal cover:
Step 1:
=>Remove trivial functional dependencies.
=>AG -> A is a trivial fiunctional dependency so remove it.
=>Reduced functional dependencies set = {ACD -> EF, B -> CFH, D -> C, DF -> G, F -> C, F -> D}
Step 2:
=>Split functional dependencies such that right hand side contains only one attribute in each functional dependency.
=>Reduced functional dependencies set = {ACD -> E, ACD -> F, B -> C, B->F, B -> H, DF -> G, F -> C, F -> D}
Step 3:
=>Removing unused functional dependencies
=>functional dependency B -> C is unused because we can derive it using B -> F and F -> C.
=>Reduced functional dependencies set = {ACD -> E, ACD -> F, B->F, B -> H, DF -> G, F -> C, F -> D}
Step 4:
=>Removing extraneous attributes from the left hand side of the functional dependencies.
=>There is no extraneous attribute.
Step 5:
=>Combining functional dependencies
=>Reduced functional dependencies set = {ACD -> EF, B->FH, DF -> G, F -> CD}
=>Hence minimal cover = {ACD -> EF, B->FH, DF -> G, F -> CD}
Finding candidate keys:
=>There is no attributes "A" and "B" at the right hand side part of any of the given functional dependencies hence attributes "A" and "B" must be present in every candidate key as candidate key has ability to derive all the attributes of the relation.
=>(AB)+ = ABCDEFGH
=>Attribute closure of AB contains all the attributes of the relation hence AB is only the candidate key and if we include any other attribute with AB then it wil form super key.
=>Hence candidate key = {AB}
I have explained each and every part with the help of statements attached to the answer above.