Question:

Consider the relation \( R(A, B, C, D, E) \)
Functional Dependencies:
\[ A \rightarrow BC \] \[ CD \rightarrow E \] \[ E \rightarrow A \] Find the number of candidate keys.

Show Hint

If an attribute never appears on the right-hand side of any functional dependency, it must be part of every candidate key.
Updated On: Feb 15, 2026
Hide Solution
collegedunia
Verified By Collegedunia

Correct Answer: 2

Solution and Explanation

Step 1: Analyze given Functional Dependencies.
Given:
1. \( A \rightarrow BC \)
2. \( CD \rightarrow E \)
3. \( E \rightarrow A \)
From (3) and (1):
\[ E \rightarrow A \rightarrow BC \] So, \[ E \rightarrow ABC \] Step 2: Check attribute closures.
Total attributes are \( A, B, C, D, E \).
Since no dependency gives \( D \), every candidate key must contain \( D \).
Now check minimal combinations containing \( D \).
(i) Closure of \( AD \)
\[ AD \Rightarrow A \] Using \( A \rightarrow BC \), \[ AD \Rightarrow ABCD \] Now since \( C \) and \( D \) are present, \[ CD \rightarrow E \] So, \[ AD \Rightarrow ABCDE \] Hence, \( AD \) is a candidate key.
(ii) Closure of \( ED \)
\[ ED \Rightarrow E \] Using \( E \rightarrow A \), \[ ED \Rightarrow A \] Using \( A \rightarrow BC \), \[ ED \Rightarrow ABCD \] Now \( CD \rightarrow E \) already satisfied.
So, \[ ED \Rightarrow ABCDE \] Hence, \( ED \) is also a candidate key.
Step 3: Check minimality.
Removing any attribute from \( AD \) or \( ED \) will not determine all attributes.
Thus both are minimal.
No other minimal combination works.
Final Answer: \[ \boxed{2} \]
Was this answer helpful?
0
0