Home | Previous Page | Next Page   Basics of Database Design and Implementation > Building a Relational Data Model > Normalizing a Data Model >

First Normal Form

An entity is in the first normal form if it contains no repeating groups. In relational terms, a table is in the first normal form if it contains no repeating columns. Repeating columns make your data less flexible, waste disk space, and make it more difficult to search for data. In the telephone directory example in Figure 19, it appears that the name table contains repeating columns, child1, child2, and child3.

Figure 19. Name Entity Before Normalization
begin figure description - This figure is described in the surrounding text. - end figure description

You can see some problems in the current table. The table always reserves space on the disk for three child records, whether the person has children or not. The maximum number of children that you can record is three, but some of your acquaintances might have four or more children. To look for a particular child, you have to search all three columns in every row.

To eliminate the repeating columns and bring the table to the first normal form, separate the table into two tables as Figure 20 shows. Put the repeating columns into one of the tables. The association between the two tables is established with a primary-key and foreign-key combination. Because a child cannot exist without an association in the name table, you can reference the name table with a foreign key, rec_num.

Figure 20. First Normal Form Reached for Name Entity
begin figure description - This figure is described in the surrounding text. - end figure description

Now check Figure 17 for groups that are not in the first normal form. The name-modem relationship is not in the first normal form because the columns b9600, b14400, and b28800 are considered repeating columns. Add a new attribute called b_type to the modem table to contain occurrences of b9600, b14400, and b28800. Figure 21 shows the data model normalized through the first normal form.

Figure 21. The Data Model of a Personal Telephone Directory
begin figure description - This figure is described in the surrounding text. - end figure description
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]