1 1 vote Suppose we have a relation R(X, Y, Z, W) with the FW’s : X → Y, Y → Z, Z → W Which one of the following decompositions is not lossless (i.e., for some instance of R, the natural join of the decomposed relations is not equal to R)? R1(X, Y), R2(Y, Z), R3(Z, W) R1(X, Y), R2(X, Z), R3(X, W) R1(X, W), R2(Y,W), R3(Z, W) None of the above (that is, they are all lossless) Databases + – neha singh 726 views answer comment Share Follow Print See 1 comment 1 1 comment reply Ashwin_R commented Sep 20, 2016 reply Follow flag In option A, R1 and R3 do not have any element in common, shouldn't that decomposition be lossy...? What is the correct option...? 0 0 replyShare Please log in or register to add a comment.
0 0 votes Answer here is (c) option here decomposition is lossy R1(X, W), R2(Y,W), R3(Z, W) R1∩R2=w where here w is not super key for either R1 or R2. So its lossy join . focus _GATE answered Sep 20, 2016 focus _GATE comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes @Neha singh. Remember one thing(rather thumb rule). If you know the concept (and not the shortcut),its okay. Just take an example an compute it. GATE exam setters put the question in such a way that it can be computed in max 2 min even with basic knowledge.SO, lets assume that I dont know the shortcut. Lets have an example. Serial no(X) Name(Y) Lives at flat no(Z) owns car model name(W) 1 sush 520 Y 2 kim 521 Y ...............(kim and sush are wife and husband :) ) 3 Arush 522 Z --------------------------------------------------------------------------------------- Lets evaluate option (C). R1 Serial no(X) owns car model name(W) 1 Y 2 Y 3 Z ---------------------------------------------------------- R2 Name(Y) owns car model name(W) sush Y kim Y Arush Z --------------------------------------------------------------- R3 Lives at flat no(Z) owns car model name(W) 520 Y 521 Y 522 Z Now, even R1(natural join) R2 will yield 6 tuples (instead of 3 in the original for columns pertaining to R1 and R2). So, R1(natural join) R2 (natural join) R3 will definitely yeild more tuples than 3. Hence, lossy join decomposition. Sushant Gokhale answered Sep 20, 2016 Sushant Gokhale comment Share Follow See 1 comment 1 1 comment reply Sushant Gokhale commented Sep 20, 2016 reply Follow flag SHortcut is: closure over original relation( R1 $\bigcap$ R2) = superkey for R1 or R2 0 0 replyShare Please log in or register to add a comment.