On Normalization

People have funny ideas about database normalization.

What normalization is not:

  • creating an (id,value) table for every single piece of data is not normalization
  • using surrogate keys for everything is not normalization
  • a way to improve performance (though it sometimes does)

Equally, failing to do the above does not mean your data is “denormalized”.

What normalization is:

  • keeping your data consistent by ensuring that the relationships between values exist only in one place
  • applying the rules: 1NF, 2NF, 3NF, BCNF, 4NF, 5NF … usually between 3NF and 4NF is enough

Obviously, though, there are times when one denormalizes for performance reasons, with appropriate care to ensure consistency isn’t lost in the process.

This entry was posted in Peeves, PlanetPG, SQL. Bookmark the permalink.