Linked answer questions
Statement for Linked Answer Questions 54 and 55:
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.
Shared with question 55.
Question
How many candidate keys does the relation R have?
Official answer and solution
- Official answer
- B
- From
- Official GATE 2013 answer key
Solution
Find essential attributes that never appear on the right-hand side of any functional dependency and compute attribute closures to find all candidate keys.
The relation has functional dependencies:
-
Identify essential attributes:
- Attribute does not appear on the right-hand side of any dependency (in fact, does not appear in at all).
- Therefore, must be a component of every candidate key.
-
Check closures of candidate key combinations:
-
Closure of :
Since no proper subset of determines all attributes, is a candidate key.
-
Since , consider :
Thus, is a candidate key.
-
Since , consider :
Thus, is a candidate key.
-
Since , consider :
Thus, is a candidate key.
-
Attributes only have . Even with , , so no other combination can form a candidate key.
-
Therefore, the relation has exactly 4 candidate keys: . This matches option (B).
B
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2013 Computer Science and Information Technology (CS)
- Question
- 54 of 65, printed as CS Q.54
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.