2,887 views
5 votes
5 votes
Let R(X,Y,Z,W) be a relational schema with the following functional dependencies:

$X\rightarrow Y, Y\rightarrow Z, Z\rightarrow W$ and $W\rightarrow Y$

The decomposition of R into (X,Y),(Y,Z),(Y,W) is
a. Lossy join, but is dependency preserving
b. Lossless join, but is not dependency preserving
c. Lossless join and dependency preserving
d. Lossy join and not dependency preserving

3 Answers

Best answer
6 votes
6 votes

Two relations are lossless if they share atleast one common attrubute which is superkey of one relation .

(X,Y),with X-> Y

(Y,Z)  with Y-> Z and Z-> Y

(Y,W) with Y->W and W-> Y

so take (X,Y) and (Y,Z) here common attribute is Y which is superkey of (Y,Z) so lossless. and becomes (X,Y, Z)

Now (X,Y, Z) and (Y,W) here common attribute is Y which is superkey of (Y,W) so lossless. and becomes (X,Y, W, Z)

So Relations are lossless.

For dependency preserving : All reation should hold dependency present in given realtion.

(X,Y),with X-> Y

(Y,Z)  with Y-> Z and Z-> Y

(Y,W) with Y->W and W-> Y

In orignal relation only W-> Z  and Z-> W is left which not covered by all breking relation but since (Y,W) with W ->Y and (Y,Z)  with Y-> Z  implied W-> Z . (Y,Z) with Z-> Y and(Y,W) with Y->W implied Z-> W .so relations in depedency preserving also.

C is answer.

selected by
0 votes
0 votes
it is lossless join and as well as dependency preserving

(X,Y) ,(Y,Z),(Y,W) ---here we can combine these relations as the common attribute in two of the relations is a primary key

and closure of functional dependencies are also satisfied by these relations so answer is C
reshown by

Related questions