Pregunta

Consider the schema S=(A,B,C,D) having AB as primary key, and the following functional dependencies (FD) hold on it: AB --> C, AB --> D, BC --> D. Is the following decomposition in Boyce-Codd Normal Form (BCNF)? S1=(A,B,D) & S2=(B,C,D)

Attempted answer which probably misses something: Using the given FDs, in S1 the key is AB; in S2 the key is BC. S1 contains the FD AB-->D, and its left hand side contains its key, AB. S2 contains the FD BC-->D, and its left hand side contains its key, BC. Hence, it seems that the decomposition is in BCNF.

However, we know that BCNF decompositions are lossless, and this one is not. The common attributes are {B,D} and its closure is still {B,D}.

Where is the bug then?

¿Fue útil?

Solución

Lossless as in "lossless decomposition" means that :

  • any relation value of the original schema
  • * that satisfies all the dependencies in the original schema *
  • can be decomposed by relational projection into relation values corresponding to the decomposed schemata
  • and the natural join of those decomposed relation values is guaranteed to yield the original relation value back again.

That is what "lossless" means, and that's ALL that it means.

It has nothing to do with expressibility of FD's in decomposed schemas (which may indeed be "lost" by the decomposition - as is the case in your example).

There is no bug.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top