I'm reading a textbook containing the following question:
Given the following relation R {A,B,C,D,E,H} and the functional
dependencies AB->CD, BC->D, C->H, D->HB, CH->AE
does the following decomposition is dependency preserving?
R1(A,C,E,H) R2(B,D,H), R3(A,B,C), R4(B,C,D)
The answer of the textbook was that it is in fact functional dependency preserving, where I thought it wasn't because of the dependency AB->D
Reading this answer made it even more confusing, because it made it seems like if there is a key inside one of the sub relations, the decomposition must be dependency preserving
A counter example that I couldn't dispute is
For the two rows
a1 b1 c1 d1 h1 e2
and
a2 b1 c2 d2 h2 e2
all the F.D of R hold, but now R3 has
a1 b1 c1 and a2 b1 c2
and R4 has
b1 c1 d1
and
b1 c2 d2
,
joining R3 and R4 on B gives a1 b1 c2 d2
which breaks the AB->D
F.D