Search code examples
database-normalizationdecomposition

Decomposition into ABC & CDE and preserving functional dependencies


Consider a relation R with five attributes ABCDE. Now assume that R is decomposed into two smaller relations ABC and CDE. Define S to be the relation (ABC NaturalJoin CDE). a) Assume that the above decomposition is lossless join. What is the dependency that guarantees the lossless join property. b) Give an additional FD such that “dependency preserving” property is violated by this decomposition. c) Give two additional FD's that would be preserved by this decomposition.

Question seems different to me because there is no FD given and its asking:

a)

R1=(A,B,C) R2=(C,D,E) R1∩R2 =C (how can i control dependency now)
 F1' = {A->B,A->C,B->C,B->A,C->A,C->B,AB->C,AC->B,BC->A...}
 F2' = {C->D,C->E,D->E....}

then i will find F' ??

b,c) how do i check , do i need to look for all possible FD's for R1 and R2


Solution

  • The question is definitely assuming things it hasn't said clearly. ABCDE could be subject to the JD *{ABC,CDE} while not being subject to any nontrivial FDs at all.

    But suppose that the relation is subject to some FDs and isn't subject to any JDs other than ones that they imply. If C is a CK then the join is lossless. But then C -> ABCDE holds, because a CK determines all attributes, and C -> ABDE holds, because a CK determines all other attributes. No other FD holding would imply that the join is lossless, although that requires tedium (by looking at every possible case of CK) or inspiration to show.

    Both these FDs guarantee losslessness. Although if one of these holds the other holds, and they express the same condition. So the question is sloppy. Or the question might consider that the two expressions express the same FD in the sense of a condition, but a FD is an expression and not a condition, so that would also be sloppy.

    I suspect that the questioner really just wanted you to give some FD whose holding would guarantee losslessness. That would get rid of the complications.