GATE / CS ARCHIVE

GATE CSE 2021 SET 1 / QUESTION 33

GATE CSE 2021 Set 1 Q33

Database Management Systems · Normalization & Decomposition · Full GATE CSE 2021 Set 1 paper

GATE 2021 Set 1, Q33 2 marks · MCQ
Report issue

Normalization & Decomposition

Question 33, GATE 2021: R(P,Q,S,T,X,Y,Z,W) has FDs PQ→X, P→YX, Q→Y, Y→ZW. D1 decomposes it into (P,Q,S,T),(P,T,X),(Q,Y),(Y,Z,W). D2 decomposes it into (P,Q,S),(T,X),(Q,Y),(Y,Z,W). Which is correct? A D1 lossless/D2 lossy; B D1 lossy/D2 lossless; C both lossless; D both lossy.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (2 parts)

For D1, join PQST with PTX on PT: P→X makes PT a key of PTX, so this step is lossless. Join QY using Q→Y, then YZW using Y→ZW; both steps are lossless. D2 separates TX from every other component, leaving no common attribute to reconnect it. A concrete legal relation can contain two rows with distinct P, Q, S, T, X, Y, Z, W values; all listed FDs hold, but joining its D2 projections pairs each TX row with either other-part row, creating spurious tuples. Thus D1 is lossless and D2 lossy, A.

For D1, add projections in the order PQST,PTX,QY,YZW. Their intersections with the accumulated schema are PT,Q,Y respectively, each determining all attributes of the new projection via P→X,Q→Y,Y→ZW. The binary lossless-join criterion applies at each step. For D2 use two original tuples (p1,q1,s1,t1,x1,y1,z1,w1) and (p2,q2,s2,t2,x2,y2,z2,w2) with every subscripted value distinct. All FDs hold, yet the join contains (p1,q1,s1,t2,x2,y1,z1,w1), which was not an original tuple.

Original paper, page 28 · Answer key