How do you tell if a relation R is in BCNF and 3NF?
I’m reading a textbook, and it’s telling me that there are 3 main attributes you’re looking at, but I’m having trouble understanding what they’re saying, or at least applying what they’re saying when given a relation and FD’s.
The 3 attributes:
Given a relation R with the attribute A, and X a subset of attributes of R, for every FD X⟶A in F, one of the following statements is true:
- A ∈ X; that is, it is a trivial FD (∈ meaning “is found in X”)
- X is a superkey
- A is part of some key for R
The top two correspond to BCNF, and 3NF’s include the third.
The book SQL Antipatterns by Bill Karwin has a nice example about BCNF and 3NF on page 303 that is a little complicated but I believe points out the difference more succinctly than any description of the difference I’ve read so far.
The book then changes this single table (which satisfies 3NF) into two tables that satisfy BCNF: