天天看点

Third Normal Form (3NF)

Definition: In order to be in Third Normal Form, a relation must first fulfill the requirements to be in Second Normal Form.  Additionally, all attributes that are not dependent upon the primary key must be eliminated.

Examples: The following table is NOT in Third Normal Form:

Company City State ZIP
Acme Widgets New York NY 10169
ABC Corporation Miami FL 33196
XYZ, Inc. Columbia MD 21046

In this example, the city and state are dependent upon the ZIP code.  To place this table in 3NF, two separate tables would be created -- one containing the company name and ZIP code and the other containing city, state, ZIP code pairings.

This may seem overly complex for daily applications and indeed it may be.  Database designers should always keep in mind the tradeoffs between higher level normal forms and the resource issues that complexity creates.

继续阅读