First Normal Form

First Normal Form is a property of database tables.

A table is in First Normal Form (1NF) when it has no MultiValued fields.

The following table is not in 1NF:

  Make   | Model | Color 
 --------|-------|-------
  Ford   | Focus | White 
         |       | Blue  
         |-------|-------
         | F-150 | White 
         |       | Blue  
 --------|-------|-------
  Toyota | Camry | White 
         |       | Red   

This table has multi-valued records, and might be used to store the various models and colors available to some makes.

The previous table has been converted to 1NF as follows:

  Make   | Model | Color 
 --------|-------|-------
  Ford   | Focus | White 
  Ford   | Focus | Blue  
  Ford   | F-150 | White 
  Ford   | F-150 | Blue  
  Toyota | Camry | White 
  Toyota | Camry | Red   

Note how the table now lacks a so-called primary key! What you must ask is ... why did you need that primary key anyway? I know! SecondNormalForm!

You can't, in the general case, determine the PrimaryKey of a table by looking at example data. A primary key is a candidate key that has been designated as "primary" as a matter of convenience. This table has one candidate key, consisting of all three of its columns. It is apparent from the example data that this is the only possible candidate key, so, if it's necessary to designate a PrimaryKey, that's it.


See also SecondNormalForm, ThirdNormalForm


CategoryDataStructure CategoryDatabase


EditText of this page (last edited January 6, 2009) or FindPage with title or text search