retagged by
13,051 views
27 votes
27 votes

Consider the relation $R(P,Q,S,T,X,Y,Z,W)$ with the following functional dependencies.

$$PQ\rightarrow X;\quad P\rightarrow YX;\quad Q\rightarrow Y; \quad Y\rightarrow ZW$$

Consider the decomposition of the relation $R$ into the constituent relations according to the following two decomposition schemes.

  • $D_1:\quad R=[(P,Q,S,T);\;(P,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?

  1. $D_1$ is a lossless decomposition, but $D_2$ is a lossy decomposition
  2. $D_1$ is a lossy decomposition, but $D_2$ is a lossless decomposition
  3. Both $D_1$ and $D_2$ are lossless decompositions
  4. Both $D_1$ and $D_2$ are lossy decompositions
retagged by

5 Answers

0 votes
0 votes
For D1:
(P,Q,S,T)      {}
(P,T,X)  { P--> X}  pk = {PT}
(Q,Y) { Q--> Y } PK = {Q}
(Y,Z,W) { Y --> ZW} PK = {Y}
The Relations and their corresponding FD's
Let's Join (P,Q,S,T) & (P,T,X) common attribute = P
P is a Super key(Primary key is a minimal Super key) we can join and it will a lossless join
(P,Q,S,T,X) becomes the new Table
Now Join (P,Q,S,T,X) & (Q,Y) ,here Q is the common and it is the Pkey of (Q,Y)
Lossless Join and becomes (P,Q,S,T,Y,X)
Finally Join (P,Q,S,T,Y,X) & (Y,Z,W)
Similarly joined as YZ is a Skey
so , Lossless.
But For D2:
(P,Q,S),(Q,Y),(Y,Z,W) These three can be joined but the resultant can;t be joined with this (T,X)
as there will no common attribute.
Answer:

Related questions

16 votes
16 votes
4 answers
5