726 views
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)

2 Answers

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 .

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.
Position:
Show:

Related questions

0 0 votes
0 0 answers
418
418 views
Prem Sai Kodi asked Jan 22
418 views
I'm confused about this...help me... 
0 0 votes
0 0 answers
455
455 views
DTYDHTB asked Dec 12, 2025
455 views
Consider a database system where transactions are executed concurrently. If transaction T1 holds an exclusive lock on resource R1 and requests a shared lock on resource R...
0 0 votes
0 0 answers
573
573 views
Naman_Chandel asked Dec 4, 2025
573 views
In a universally database, there are entity sets: Student (SID, Name, Dept), Professor (PID, Name, Dept), Course (CID, Title) and Project (ProjID, Topic). Student registe...
0 0 votes
0 0 answers
222
222 views
Sarthak_Joshi asked Jul 18, 2025
222 views
Consider the following interleaved schedule S involving transaction T₁, T₂ on data item X and Y.S: R₁(X); W₁(X); R₂(X); W₂(X); R₂(Y); W₂(Y); R₁(Y); W₁(Y); C₂, C₁Where R(X...