Relation \(R\) has eight attributes \(ABCDEFGH\). Fields of \(R\) contain only…
2013
Relation \(R\) has eight attributes \(ABCDEFGH\). Fields of \(R\) contain only atomic values.
\(F={CH→G, A→BC, B→CFH, E→A, F→EG}\) is a set of functional dependencies (FDs) so that \(F^+\) is exactly the set of FDs that hold for \(R\).
How many candidate keys does the relation \(R\) have?
- A.
3
- B.
4
- C.
5
- D.
6
Attempted by 689 students.
Show answer & explanation
Correct answer: B
Key idea: D must be in every candidate key because D does not appear on the right-hand side of any functional dependency.
Compute closures (without D) to find which single attributes determine all others:
A+ = {A, B, C, F, H, E, G} (A → BC; B → CFH; F → EG; E → A)
B+ = {B, C, F, H, E, A, G} (B → CFH; F → EG; E → A; A → BC)
E+ = {E, A, B, C, F, H, G} (E → A; A → BC; B → CFH; F → EG)
F+ = {F, E, G, A, B, C, H} (F → EG; E → A; A → BC; B → CFH)
Each of A, B, E, and F individually determines all attributes except D, so when combined with D they give minimal keys: AD, BD, ED, and FD.
Therefore the relation has 4 candidate keys.