Download free books at BookBooN.com
An Introduction to Relational Database Theory
205
Database Design I: Projection-Join Normalization
Observations similar to those made in connection with decompositions indicated by FDs apply here too. If
the decomposition into SC and CT really is required to be equivalent to SCT, then every course that covers
at least one topic must have at least one student on it, and every course on which at least one student is
enrolled must cover at least one topic. A constraint with condition equivalent to SC{C} = CT{C} needs to
be declared. But the putative business rule giving rise to a requirement for such a constraint is
questionable. Can’t a course exist before any students are enrolled on it? Does every course have to be
subdivided into topics? The decomposition allows enrolments and coverage of topics to be recorded
independently of each otherwhich seems intuitively sensible in any case.
Now, when BCNF was first introduced it was known that relvars like SCT existed that are in BCNF and
yet exhibit redundancy that can be avoided by taking projections. It was some time later that these cases
were carefully studied, the concept of JD was formulated as a generalization of FD, and even stronger
normal forms were defined to fill the remaining gaps left by BCNF. As 2NF and 3NF have already been
mentioned as concepts previously essayed but later superseded (by BCNF), you must be wondering about
the apparent numerical gap between 3NF and 5NF. Well, SCT is in fact in violation of 4NF as well as 5NF.
Observe that the JD *{{S,C}, {C,S}} that causes SCT to violate 5NF is a binary JD in particular. It is
because that JD is binary that SCT violates 4NF. 4NF was originally defined, not in terms of JDs in
general, but in terms of a kind of dependency called multi-valued dependency (MVD), of which a
functional dependency is a special case. However, it turns out that every MVD is equivalent to a certain
binary JD, so we no longer really need to study MVDsthe interested reader can easily find out about
them in the literature.
It follows from the definition of 4NF that any relvar that is in 4NF but not 5NF must be subject to a
nonredundant JD of degree greater than two (where a JD is redundant if and only if at least one of its
projections is redundant). Moreover, that JD must be such that it’s not merely a consequence of two or
more binary JDs, unlike the nontrivial ternary JD we noted in WIFE_OF_HENRY_VIII. A relvar subject
to such a JD cannot be decomposed into 5NF relvars by a succession of two-way decompositionsagain,
unlike WIFE_OF_HENRY_VIII, which we decomposed in two stages. The study of such relvars
eventually led to 4NF being subsumed by 5NF. We must now complete the story of projection-join
normalization by showing that such JDs (let’s call them irreducible non-binary JDs), and therefore such
relvars, do indeed exist.
Irreducible non-binary JDs
Here again is the definition I gave earlier for fifth normal form:
Relvar r is in fifth normal form (5NF) if and only if every join dependency
that holds in r is implied by the keys of r.
We can retrospectively define 4NF just by inserting the word “binary” immediately before “join” in the
definition of 5NF. The JD *{{S,C}, {C,T}} holds in SCT and it is intuitively clear that, given that the only
key of SCT is the entire heading, we cannot deduce from that fact alone that this JD holds (as is confirmed
by application of the algorithm given under reference [12] in Appendix B).