IAE Academy

GATE 2026 CS1 Q.65: solution and answer

GATE 2026 · CS1Q.65 · 2 marks · NAT

Consider a relational database schema with a relation . If and are the only two candidate keys of the relation , then the number of superkeys of relation is ______. (answer in integer)

See the question in the paper

Answer and solution

ANSWER

The relation has 6 superkeys.

Official answer: 6Source: Official answer key, GATE 2026 CS1 (IIT Guwahati)

  1. A superkey is any attribute set that contains a candidate key. The only candidate keys are and , so a set is a superkey exactly when it contains or contains .

  2. Let be the family of supersets of . The attributes and may each be present or absent, so : .

  3. Let be the family of supersets of . The attributes and are free, so : .

  4. A set in both families contains , and , with free. So : and .

  5. By inclusion–exclusion, .

  6. Listing them: . There are 6 superkeys.

KEY IDEA

A superkey is any set that contains a candidate key. Count the supersets of each candidate key and use inclusion–exclusion so that sets containing both keys are not counted twice.

WATCH OUT FOR

Adding and forgetting that and contain both candidate keys. Another slip is to count only the candidate keys themselves, or to leave out the supersets that include .

From the GATE 2026 CS1 paper. Every question of this paper · Download the full paper · All 19 Normal forms questions, with notes

More Normal forms questions