7.29

Show that the following decomposition of the schema R of Exercise 7.1 is not a lossless decomposition:

(A,B,C)(C,D,E)

Hint: Give an example of a relation r(R) such that ΠA,B,C(r)ΠC,D,E(r)r


Take the following instance of r(R):-

A B C D E
1 6 5 7 3
2 8 5 9 4

Then ΠA,B,C(r) is:-

A B C
1 6 5
2 8 5

ΠC,D,E(r) is:-

C D E
5 7 3
5 9 4

And their natural join ΠA,B,C(r)ΠC,D,E(r) is:-

A B C D E
1 6 5 7 3
1 6 5 9 4
2 8 5 7 3
2 8 5 9 4

Thus, the decomposition is a lossy decomposition.