SQL Criteria for Normal Forms

Part of the SQL All-in-One For Dummies Cheat Sheet

In SQL, normal forms are defining characteristics of relational databases. SQL forms get classified according to the types of modification anomalies they're subject to. First, second, and third normal forms (1NF, 2NF, 3NF) serve as remedies to the three main sources of modification anomalies.

The normal forms are nested in the sense that a table that's in 2NF is automatically also in 1NF. Similarly, a table in 3NF is automatically in 2NF, and so on. For most practical applications, putting a database in 3NF is sufficient to ensure a high degree of integrity. To be absolutely sure of its integrity, you must put the database into DK/NF.

The following lists lay out the criteria for each form:

First Normal Form (1NF):

  • Table must be two-dimensional, with rows and columns.

  • Each row contains data that pertains to one thing or one portion of a thing.

  • Each column contains data for a single attribute of the thing being described.

  • Each cell (intersection of row and column) of the table must be single-valued.

  • All entries in a column must be of the same kind.

  • Each column must have a unique name.

  • No two rows may be identical.

  • The order of the columns and of the rows does not matter.

Second Normal Form (2NF):

  • Table must be in first normal form (1NF).

  • All nonkey attributes (columns) must be dependent on the entire key.

Third Normal Form (3NF):

  • Table must be in second normal form (2NF).

  • Table has no transitive dependencies.

Domain-Key Normal Form (DK/NF):

  • Every constraint on the table is a logical consequence of the definition of keys and domains.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus

SERIES
SQL All-in-One For Dummies Cheat Sheet

Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.