edited by
831 views
2 votes
2 votes
Let R(X,Y,Z,W) be a relational schema with the following dependencies:

  X -> Y, Y->Z ,Z ->W AND W -> 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 is  dependency preserving

d) Lossy join , and  is not dependency preserving
edited by

2 Answers

Best answer
5 votes
5 votes

Given , set of dependecies X --> Y , Y --> Z , Z --> W and W --> Y and the table is decomposed into (x,y) , (y,z) and (y,w).

Lossless property is satisfied since intersection of (x,y) , (y,z) is y and y+ = yz which is superkey for (y,z) hence we can merge them .Then intersection (x,y,z) and (y,w) is y+ = yw since  Y --> Z and Z --> W.Hence the given decomposition is lossless.

Now coming to dependency preservation , we have to write all the direct and implied dependencies for each of the subrelations.Lers write for each of the subrelation one by one.

a) For (x,y) : X --> Y(direct)

b) For (y,z) : Y --> Z(direct) , Z --> Y(implied from Z --> W and W --> Y)

c) For (w,y) : W --> Y(direct) , Y --> W(implied from Y --> Z and Z --> W)

Now for checking the dependency preservation , we have to check from the original FD set whether each of the FDs are satisfied from the FDs which are there in the subrelations.

Now X --> Y , Y --> Z and W --> Y are also there in subrelations so no concern here.

For Z --> W , we have found the implied dependencies Z --> Y and Y --> W from which we can obtain Z --> W.Hence this FD is also satisfied in the subrelation.Hence the given decomposition is dependency preservation also.

Hence C) is the correct option.

selected by
0 votes
0 votes
X -> Y, Y->Z ,Z ->W AND W -> Y

Relations are  (x,y),(y,z),(y,w)

(x,y)∩(y,z)=y which is super key for (y,z)

Now (xyz)∩(yw)=y which is super key for relation (yw) so its lossless join .

Z ->W is not preserved in the decomposition  so its not dependency preserving .

(B) option true .
edited by

Related questions

0 votes
0 votes
1 answer
1
1 votes
1 votes
1 answer
3