382 views
1 votes
1 votes

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)

2 Answers

0 votes
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 .

0 votes
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.

Related questions

0 votes
0 votes
1 answer
1
Mrityudoot asked Jan 12
128 views
Isn’t F$^{+}$ minimal cover? If C $\rightarrow$ A is already there, then why does augmented CD $\rightarrow$ A needs to be?
0 votes
0 votes
1 answer
2
0 votes
0 votes
1 answer
3