First you need to learn superkeys, candidate keys, and primary attributes.
However, this rule of thumb helps:
A 3NF table that does not have multiple overlapping candidate keys is guaranteed to be in BCNF.
In other words, if the candidate keys in a 3NF relation are
- all atomic, or
- non-atomic but non-overlapping,
it is guaranteed that the relation is in BCNF.
The simplest relation which violates BCNF but meets 3NF has the following functional dependencies:
A,B -> C C -> B
In this case, candidate keys are (A,B)
and (A,C)
.
It meets 3NF because
- the right-hand-side of all functional dependencies is a primary attribute.
It violates BCNF because
C -> B
, but the left-hand-side is not a superkey.