in Databases
245 views
0 votes
0 votes
If a relation is decomposed into more than two relations then what is the correct method to check whether the decomposition is lossless or not? Can we use R1⋂R2→R1 or R1⋂R2→R2 pairwise for the decomposition or is there any other method?
in Databases
245 views

1 Answer

1 vote
1 vote
Best answer

Say a relation R(A,B,C,D,E) is decomposed into 3 relations - R1(A,B,C), R2(C,D), R3(D,E).

Take an two decompositions first. I am taking R1 and R2.

Find the closure of the common attribute(s) i.e. (C+) and see if C is a key of any of R1 or R2. If yes, join R1 and R2 to a new relation, say R12 (A,B,C,D).

Now we have two relations R12(A,B,C,D) and R3(D,E). Again take the common attribute(s) and apply closure.

This can be repeated for any number of relations.

selected by