For BCNF decomposition, is it okay to have a relation with none of the original functional dependencies?

dba.stackexchange https://dba.stackexchange.com/questions/217994

Question

Given the relation R[c, f, g, h, e, j, a, b, d, i] with the below functional dependencies I have come up with the below solution. However, I am unsure about it, considering R8 has none of the listed functional dependencies even though it has the LHS of some. I followed the instructions for decomposition into BCNF but I am unsure it this is the correct solution?

Functional Dependencies

a → b
{ c, a } → d
c → e
f → { g, h, i, j }

Solution

In BCNF:
R1[f, g, h, i, j]
R3[a, b]
R5[c, a, d]
R7[c, e]
R8[c, f, a]
Était-ce utile?

La solution

Your solution is correct, and correctly in R8 no non-trivial dependency holds.

This happens since the classical so-called “analysis” algorithm for BCNF, works by removing from the original relation (and the decomposed relations) the dependencies that violates the Normal Form, leaving behind only the left hand side of the dependency.

In this case, at the end of the algorithm, the relation that remains is {c, f, a} in which there are no non-trivial dependencies (so that {c, f, a} is the only candidate key of the relation).

One can note that these three attributes are also a candidate key (actually the only candidate key) of the original relation.

In fact, there is a theorem that says that to have a loss-less decomposition it is necessary to have at least a relation that contains all the attributes of a candidate key.

Finally, note that the decomposition also preserves the functional dependencies (and this is not obvious since the algorithm to decompose in BCNF sometimes produces a decomposed schema with a loss of dependencies).

Licencié sous: CC-BY-SA avec attribution
Non affilié à dba.stackexchange
scroll top