13.9
General Definitions of 2NF and 3NF
The definitions for 2NF and 3NF given in Sections 13.7 and 13.8 disallow partial or
transitive dependencies on the primary key of relations to avoid the update anomalies
described in Section 13.3. However, these definitions do not take into account other candidate
keys of a relation, if any exist. In this section, we present more general definitions
for 2NF and 3NF that take into account candidate keys of a relation. Note that this requirement
does not alter the definition for 1NF as this normal form is independent of keys and
functional dependencies. For the general definitions, we define that a candidate-key
attribute is part of any candidate key and that partial, full, and transitive dependencies are
with respect to all candidate keys of a relation.
Second Normal A relation that is in First Normal Form and every non-candidate-
Form (2NF) key attribute is fully functionally dependent on any candidate key.
Third Normal A relation that is in First and Second Normal Form and in which
Form (3NF) no non-candidate-key attribute is transitively dependent on any
candidate key.
When using the general definitions of 2NF and 3NF we must be aware of partial and
transitive dependencies on all candidate keys and not just the primary key. This can
make the process of normalization more complex; however, the general definitions place
additional constraints on the relations and may identify hidden redundancy in relations that
could be missed.
The tradeoff is whether it is better to keep the process of normalization simpler by
examining dependencies on primary keys only, which allows the identification of the most
problematic and obvious redundancy in relations, or to use the general definitions and
increase the opportunity to identify missed redundancy. In fact, it is often the case that
whether we use the definitions based on primary keys or the general definitions of 2NF and
3NF, the decomposition of relations is the same. For example, if we apply the general
definitions of 2NF and 3NF to Examples 13.10 and 13.11 described in Sections 13.7 and
13.8, the same decomposition of the larger relations into smaller relations results. The
reader may wish to verify this fact.
In the following chapter we re-examine the process of identifying functional dependencies
that are useful for normalization and take the process of normalization further by discussing
normal forms that go beyond 3NF such as Boyce–Codd Normal Form (BCNF).
Also in this chapter we present a second worked example taken from the DreamHome case
study that reviews the process of normalization from UNF through to BCNF.