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 \(\Pi_{A,B,C}(r) \bowtie \Pi_{C,D,E}(r) \not = r\)


Take the following instance of \(r(R)\):-

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

Then \(\Pi_{A,B,C}(r)\) is:-

A B C
1 6 5
2 8 5

\(\Pi_{C,D,E}(r)\) is:-

C D E
5 7 3
5 9 4

And their natural join \(\Pi_{A,B,C}(r) \bowtie \Pi_{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.