Pregunta

I'm trying to get my head around the differences between 3NF and BCNF and I think I'm getting there but it would be great if anyone can help out.

The following is a series of relations in the 3rd normal form (helpfully stolen from Identifying Functional Dependencies which in turn took them from Connolly & Begg's Database Systems):

Client {clientNo(PK), clientName}
Owner {ownerNo(PK), ownerName}
Property {propertyNo (PK), propertyAddress, rent}
ClientRental {clientNo(PK), propertyNo(PK), rentStart, rentFinish, ownerNo(FK)}

Each property has only one owner and clients can rent those properties. Assume rent is fixed for each property.

So my question is: Are these also in the BCNF?

My hunch is the ClientRental relation is not because PropertyNo->ownerNo. So PropertyNo is a determinant in a functional dependency but it isn't a superkey.

Am is anywhere near the right ballpark?

¿Fue útil?

Solución

The short, informal way to express the difference is that, in BCNF, every "arrow" for every functional dependency is an "arrow" out of a candidate key. For a relation that's in 3NF, but isn't in BCNF, there will be at least one "arrow" out of something besides a candidate key.

Wikipedia entry for 3NF table not meeting BCNF

A common misconception is that you can normalize to 2NF and no higher, then to 3NF and no higher, then to BCNF and no higher. In fact, fixing a partial key dependency in order to reach 2NF often leaves you with all relations in 5NF. That is, you went from one relation in 2NF to multiple relations in 5NF without stopping at BCNF in between.

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