RelationalDBDesign
RedhatLinuxSys Seomining
prev next prev next
Course navigation
Lesson 4 First normal form
Objective Explain the requirements for first normal form.
Many databases require that you plan your tables so they can handle multiple occurrences of the same type of item.
A book, for example, might have several authors. The following table shows one way to handle such a circumstance:
Book table with Columns
The Author1 and Author2 fields are able to handle up to two authors for each book, but there are two obvious problems with the table:
  1. If a book has only one author, the Author2 column is wasted space.
  2. There is no place to store the name of a third, fourth, or succeeding author.

There is also a problem from a theoretical standpoint. One of the rules of tables is that every column in a table must represent a unique attribute of an entity. In the case of the Books table, the Author1 and Author2 columns represent the same attribute: an author. The technical term for columns that represent the same attribute is a repeating group. (Don't let the semantics fool you--the lead and second authors of a book are separate individuals, but they are both members of the set of Authors.)
For a table to be in first normal form (1NF), the table must not contain any repeating groups.
first normal form (1NF) : A table is in first normal form if it contains no repeating groups.
The next lesson describes how to decompose a table to first normal form.
Course navigation