Question
The maximum number of superkeys for the relation schema with as the key is _____.
Official answer and solution
- Official answer
- 8
- From
- Official GATE 2014 answer key
Solution
Use the definition of superkey as any superset of a candidate key in the relation schema.
-
Definition of Superkey:
A superkey for relation schema is any set of attributes containing a candidate key as a subset. -
Schema Attributes:
The relation schema is with 4 attributes, and is given as the key. -
Counting Superkeys Containing :
Any superkey must include attribute . The remaining 3 attributes may either be included or excluded. -
Listing All 8 Superkeys:
- Single-attribute:
- Two-attribute:
- Three-attribute:
- Four-attribute:
Total number of superkeys = .
8
Counting all possible subsets of all 4 attributes () without requiring key attribute E to be present.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2014 Computer Science and Information Technology (CS) Session 2
- Question
- 31 of 65, printed as CS Q.21
- 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.