Let R ={A, B, C, D, E, F} be a relation schema with the following dependencies…
20142015
Let R ={A, B, C, D, E, F} be a relation schema with the following dependencies C → F, E → A, EC → D, A → B Which of the following is a key for R ?
- A.
CD
- B.
EC
- C.
AE
- D.
AC
Attempted by 991 students.
Show answer & explanation
Correct answer: B
Solution: Find the candidate key(s) by computing attribute closures.
Compute the closure of EC:
Start with {E, C}.
E → A, so add A. Now have {E, C, A}.
C → F, so add F. Now have {E, C, A, F}.
A → B, so add B. Now have {A, B, C, E, F}.
EC → D (we already have E and C), so add D. Now have {A, B, C, D, E, F}.
Since EC+ = {A, B, C, D, E, F}, EC determines all attributes and is therefore a key.
Check minimality:
E+ = {E, A, B} (from E → A and A → B) — missing C, D, F, so E alone is not a key.
C+ = {C, F} (from C → F) — missing A, B, D, E, so C alone is not a key.
Thus EC is minimal and is a candidate key.
Briefly check the other choices:
CD+: start {C, D}; C → F gives F, so CD+ = {C, D, F}. Cannot derive A, B, or E, so CD is not a key.
AE+: start {A, E}; E → A and A → B give {A, B, E}. Cannot derive C, D, or F, so AE is not a key.
AC+: start {A, C}; C → F and A → B give {A, B, C, F}. Cannot derive E or D, so AC is not a key.
Final answer: EC is a candidate key for R.
A video solution is available for this question — log in and enroll to watch it.