Question
Consider a relation with the following three functional dependencies.
The number of superkeys in the relation R is _____________.
Official answer and solution
- Official answer
- 8
- From
- Official GATE 2022 answer key
Solution
Find the candidate key(s) of relation and compute the number of supersets.
Relation has functional dependencies:
- Attributes and do not appear on the right-hand side of any FD. Therefore, and must be part of every candidate key.
- Compute the attribute closure of :Using :
Using :
Since and neither nor alone can derive the other attributes, is the unique candidate key of .
3. A superkey is any superset of a candidate key. Since is the only candidate key, any superkey must contain both and .
4. The remaining 3 attributes can be included or excluded independently in ways.
Thus, there are exactly 8 superkeys.
8
Overlooking that and are essential and checking if other attribute combinations form independent candidate keys.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2022 Computer Science and Information Technology (CS)
- Question
- 31 of 65
- 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.