Skip to content

Instantly share code, notes, and snippets.

@castletheperson
Forked from anonymous/normalForms.md
Last active November 9, 2017 21:14
Show Gist options
  • Save castletheperson/a1ddd638658f2f1b7a0958741b6acc0d to your computer and use it in GitHub Desktop.
Save castletheperson/a1ddd638658f2f1b7a0958741b6acc0d to your computer and use it in GitHub Desktop.
Database Normalization

1NF (definiton of a table)

  • has a primary key
  • no repeating columns
  • all values are scalar (atomic)
  • no dependent columns (computed columns)

2NF

  • in 1NF
  • no partial dependencies
  • i.e. if there is a composite key, no values rely on just a portion of the composite key

3NF

  • in 2NF
  • no transitive dependencies in non-key attributes
  • i.e. if {A} -> (B, C) and {B} -> C, then C shouldn't be in the first table

BCNF (3.5NF)

  • in 3NF
  • all determinants are key attributes
  • i.e. no transitive dependencies in key attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment