GateAI
Integrity Constraints and Normal Forms

GATE CSE 2021 Set 1 · Q33

MCQ2 marksMedium

Time

Consider the relation R(P,Q,S,T,X,Y,Z,W)R(P, Q, S, T, X, Y, Z, W) with the following functional dependencies. PQ→X; P→YX; Q→Y; Y→ZWPQ \rightarrow X;\ P \rightarrow YX;\ Q \rightarrow Y;\ Y \rightarrow ZW Consider the decomposition of the relation RR into the constituent relations according to the following two decomposition schemes. D1:R=[(P,Q,S,T); (P,T,X); (Q,Y); (Y,Z,W)]D_1 :\quad R = [(P, Q, S, T);\ (P, T, X);\ (Q, Y);\ (Y, Z, W)] D2:R=[(P,Q,S); (T,X); (Q,Y); (Y,Z,W)]D_2 :\quad R = [(P, Q, S);\ (T, X);\ (Q, Y);\ (Y, Z, W)] Which one of the following options is correct?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) D1 is a lossless decomposition, but D2 is a lossy decomposition.

Integrity Constraints and Normal Forms

A decomposition of relation RR into R1,R2,…,RkR_1, R_2, \dots, R_k is lossless if we can successively join pairs of subrelations such that the common attributes form a superkey of at least one of the subrelations.

### Analysis of Decomposition D1D_1:Constituent subrelations: $R_1(P, Q, S, T)$, $R_2(P, T, X)$, $R_3(Q, Y)$, $R_4(Y, Z, W)$.

  1. Join $R_3(Q, Y)$ and $R_4(Y, Z, W)$:

    • Common attribute: R3∩R4={Y}R_3 \cap R_4 = \{Y\}.

    • Given Y→ZWY \rightarrow ZW, YY is a candidate key for R4R_4.

    • Thus, R3⋈R4=R34(Q,Y,Z,W)R_3 \bowtie R_4 = R_{34}(Q, Y, Z, W) is a lossless join.

  2. Join $R_1(P, Q, S, T)$ and $R_2(P, T, X)$:

    • Common attributes: R1∩R2={P,T}R_1 \cap R_2 = \{P, T\}.

    • Since P→YX  ⟹  P→XP \rightarrow YX \implies P \rightarrow X, it follows that PT→XPT \rightarrow X. Hence, {P,T}\{P, T\} is a superkey of R2R_2.

    • Thus, R1⋈R2=R12(P,Q,S,T,X)R_1 \bowtie R_2 = R_{12}(P, Q, S, T, X) is a lossless join.

  3. Join R12(P,Q,S,T,X)R_{12}(P, Q, S, T, X) and R34(Q,Y,Z,W)R_{34}(Q, Y, Z, W):

    • Common attribute: R12∩R34={Q}R_{12} \cap R_{34} = \{Q\}.

    • Attribute closure of QQ under the given FDs: Q+={Q,Y,Z,W,X}Q^+ = \{Q, Y, Z, W, X\}.

    • Therefore, Q→{Q,Y,Z,W}Q \rightarrow \{Q, Y, Z, W\}, meaning QQ is a superkey of R34R_{34}.

    • Thus, R12⋈R34=R(P,Q,S,T,X,Y,Z,W)R_{12} \bowtie R_{34} = R(P, Q, S, T, X, Y, Z, W) is lossless.

Hence, D1D_1 is a lossless decomposition.

---

### Analysis of Decomposition D2D_2:Constituent subrelations: $R_1(P, Q, S)$, $R_2(T, X)$, $R_3(Q, Y)$, $R_4(Y, Z, W)$.

  • Notice attribute TT appears only in R2(T,X)R_2(T, X).

  • The other relations contain attributes {P,Q,S,Y,Z,W}\{P, Q, S, Y, Z, W\}.

  • The intersection of $R_2(T, X)$ with the union of all other relations is $\{X\}$.

  • For a lossless join with R2R_2, either X→TX \rightarrow T or X→(P,Q,S,Y,Z,W)X \rightarrow (P, Q, S, Y, Z, W) must hold. However, X+={X}X^+ = \{X\}, so XX cannot determine TT or the other attributes.

Hence, D2D_2 is a lossy decomposition.

Therefore, A is the correct option.

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 Q33 of the GATE CSE 2021 Set 1 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. 7 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2021 Set 1.

How GATE tests Integrity Constraints and Normal Forms

More from GATE CSE 2021 Set 1

Share this solution

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

GateAI solution cardGATE CSE 2021 Set 1 · Q33 · MCQ

Consider the relation R(P, Q, S, T, X, Y, Z, W) with the following functional dependencies. PQ → X; P → YX; Q → Y; Y → ZW Consider the decomposition of the relation R into the constituent relations according to the following two decomposition schemes. D1 : R = [(P, Q, S, T); (P, T, X); (Q, Y); (Y, Z, W)] D2 : R = [(P, Q, S); (T, X); (Q, Y); (Y, Z, W)] Which one of the following options is correct?

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.