GateAI
Integrity Constraints and Normal Forms

GATE CSE 2022 · Q31

NAT1 markEasy

Time

Consider a relation R(A,B,C,D,E)R(A, B, C, D, E) with the following three functional dependencies. AB→C;BC→D;C→E;AB \rightarrow C; \quad BC \rightarrow D; \quad C \rightarrow E; The number of superkeys in the relation R is ________.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 8

Integrity Constraints and Normal Forms

Given the relation schema R(A,B,C,D,E)R(A, B, C, D, E) and functional dependencies:

  1. AB→CAB \rightarrow C

  2. BC→DBC \rightarrow D

  3. C→EC \rightarrow E

Attributes AA and BB do not appear on the right-hand side of any functional dependency, so every candidate key must contain both AA and BB.

Let us find the attribute closure of (AB)(AB):

  • (AB)+={A,B}(AB)^+ = \{A, B\}

  • Using AB→C  ⟹  {A,B,C}AB \rightarrow C \implies \{A, B, C\}

  • Using BC→D  ⟹  {A,B,C,D}BC \rightarrow D \implies \{A, B, C, D\}

  • Using C→E  ⟹  {A,B,C,D,E}C \rightarrow E \implies \{A, B, C, D, E\}

Since (AB)+(AB)^+ contains all attributes of RR, ABAB is a candidate key. Since both AA and BB are essential, ABAB is the only candidate key.

A superkey is any superset of a candidate key. Any subset of attributes containing {A,B}\{A, B\} is a superkey:

  • The remaining attributes are {C,D,E}\{C, D, E\} (a set of 33 attributes).

  • The number of superkeys is 23=82^3 = 8.

Therefore, the number of superkeys is 8.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Integrity Constraints and Normal Forms previous year question is Q31 of the GATE CSE 2022 paper. Find more GATE CSE PYQs on Integrity Constraints and Normal Forms in Databases, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Integrity Constraints and Normal Forms PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Integrity Constraints and Normal Forms in GATE CSE

Integrity Constraints and Normal Forms has 30 GATE CSE PYQs across 20 papers from 2011 to 2026. 4 of them are 1-mark NAT questions like this one, and GATE CSE 2022 has 2.

How GATE tests Integrity Constraints and Normal Forms

More from GATE CSE 2022

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2022 · Q31 · NAT

Consider a relation R(A, B, C, D, E) with the following three functional dependencies. AB → C; BC → D; C → E; The number of superkeys in the relation R is …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.