Q35.Marks: +2.0UGC NET Paper 2: Computer Science and Application 26th June 2025 Shift 1
Consider R (A,B,C,D,E) be relation with following dependencies:
C->F, E-> A, EC->D, A->B. Which of the following is a key for R?
1.CD
2.EC✓ Correct
3.ΑΕ
4.AC
Solution
The correct answer is Option 2) EC
Key Points
Relation: R(A, B, C, D, E)
Functional Dependencies (FDs): C → F, E → A, EC → D, A → B
Note: Attribute F is not in R. For finding a key of R, we only need to determine {A, B, C, D, E}; the FD C → F does not help us reach any new attribute of R and can be ignored for key finding.
A key (candidate key) is a minimal set of attributes whose closure gives all attributes of the relation.
Explanation (Attribute-Closure Method):
We compute the closure of each option using the given FDs and check if it gives {A, B, C, D, E}.
Option 1) CD
Start: CD+ = {C, D}
From C → F we can add F (outside R, not useful).
No FD gives E or A or B from C or D.
CD+ = {C, D} (not all attributes) ⇒ Not a key.
Option 2) EC
Start: EC+ = {E, C}
From E → A add A.
From A → B add B.
From EC → D add D.
Now we have {A, B, C, D, E} ⇒ covers all attributes of R.
Check minimality:
E+ = {E, A, B} (missing C, D) ⇒ E alone is not a key.
C+ = {C} plus F outside R ⇒ C alone is not a key.
Hence, EC is minimal.
Therefore, EC is a candidate key.
Option 3) AE
Start: AE+ = {A, E}
From A → B add B.
We still lack C and D. No FD gives C or D from {A, E} (since EC → D needs C too).
AE+ = {A, E, B} ⇒ Not a key.
Option 4) AC
Start: AC+ = {A, C}
From A → B add B.
No way to get E; without E, cannot use EC → D to reach D.
AC+ = {A, C, B} ⇒ Not a key.
Important Points
Attribute Closure: Repeatedly add attributes implied by FDs until no new attribute can be added. If the closure equals the whole schema, the starting set is a superkey. If none of its proper subsets is a superkey, it is a candidate key.
Ignoring outside attributes: FDs that only produce attributes not in the relation (here, F) do not affect whether a set is a key for R.