# Introduction to the Teradata® RDBMS for UNIX® Version 2 Release 2.1 - NCR

**Download**(direct link)

**:**

**24**> 25 26 27 28 29 30 .. 76 >> Next

3-4

Introduction to the Teradata RDBMS for UNIX

The Relational Model

Normalization

By definition, a relational database is always normalized because its field values are always atomic. But to simply leave it at that invites a number of problems with redundancy and potential update anomalies, and that is why the higher normal forms were developed. The next topics describe normal forms and how to achieve them.

Introduction to the Teradata RDBMS for UNIX

3-5

The Relational Model

First, Second, and Third Normal Forms

Introduction

First Normal Form

Second Normal Form

First, Second, and Third Normal Forms

This topic describes the first three normal forms: what they are, why they are needed, and how to achieve them.

The first three normal forms are stepping stones to Boyce-Codd normal form and, when appropriate, the higher normal forms.

The next topic describes Boyce-Codd (BCNF) and higher normal forms.

First normal form (abbreviated 1NF) is definitive for a relational database. All relations in a relational database must be in first normal form by definition.

A relation is said to be in first normal form if all its fields (simple domains in mathematics) are atomic. This means that a field can contain one value and one value only. No hierarchies of data values are allowed. This concept is sometimes referred to as the elimination of repeating groups from a relation.

The formal definition is as follows: For a relation to be in first normal form, the relationship between the primary key of the relation and each of the other attributes must be one-to-one (in that direction). In other words, all underlying simple domains of the relation contain atomic values only.

The nonkey attributes are said to be functionally dependent on the key.

Note: a nonkey attribute is any attribute that is not part of the primary key for the relation.

Second normal form (abbreviated 2NF) deals with the elimination of circular dependencies from a relation.

A relation is said to be in second normal form if it is in 1NF and every nonkey attribute is fully dependent on the entire primary key.

The formal definition is as follows: For a relation to be in second normal form, the relationship between any portion of the primary key of a relation and each of the other columns must not be one-to-one (in that direction). In other words, the nonkey columns are fully functionally dependent on the key.

3-6

Introduction to the Teradata RDBMS for UNIX

The Relational Model

First, Second, and Third Normal Forms

Third Normal Form

Third normal form (abbreviated 3NF) deals with the elimination of nonkey attributes that do not describe the primary key.

The formal definition is as follows: For a relation to be in third normal form, the relationship between any two nonprimary key columns or groups of columns in a relation must not be one-to-one in either direction. In other words, the nonkey columns are nontransitively dependent upon each other and the key. No transitive dependencies implies no mutual dependencies.

Attributes are said to be mutually independent if none of them is functionally dependent on any combination of the others. This mutual independence ensures that individual attributes can be updated without any danger of affecting any other attribute in a row.

Introduction to the Teradata RDBMS for UNIX

3-7

The Relational Model

Boyce-Codd and Higher Normal Forms

Introduction

Boyce-Codd Normal Form

Fourth Normal Form

Fifth Normal Form

Boyce-Codd and Higher Normal Forms

When the relational model of database management was originally proposed, it only addressed the first three normal forms. Later work with the model showed that 3NF required further refinement to ensure that update anomalies would never occur.

This topic describes Boyce-Codd normal form and briefly mentions fourth and fifth normal forms for completeness.

Third normal form does not handle situations in which a relation has multiple composite candidate keys with overlapping attributes. To eliminate these problems, Codd developed the so-called Boyce-Codd normal form (BCNF), which reduces to 3NF whenever the special situation that defines this problem does not apply.

A relation is in BCNF if and only if every determinant is a candidate key. This means that only determinants are candidate keys.

A relation is said to be in fourth normal form (4NF) if and only if whenever there is a multivalued dependency in the relation (for example, say X multiply determines Y) then all attributes of the relation are also functionally dependent on X.

In practice, the need for 4NF is rarely seen.

So far it has been possible to normalize relations by decomposing them into two of its projections. In rare occasions, simple projections are not sufficient to decompose a nonnormal relation into two relations. In these rare instances, Fifth Normal Form (5NF) is used to decompose the unnormalized relation into three or more projections of the original relation.

**24**> 25 26 27 28 29 30 .. 76 >> Next