Normalization vs. Denormalization

Normalization

  • Normalization is the process of minimizing redundancy and dependency in a relational database. Normalization usually involves dividing large tables into smaller and less redundant tables and defining relationships between them.
  • The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships. (i.e. eliminating insertion, update and deletion anomalies)
  • A relational database table is often described as "normalized" if it is in the Third Normal Form. Most 3NF tables are free of insertion, update, and deletion anomalies.


  • Normalization Types
    • 1NF: No repeating elements or groups of elements
    • 2NF: No partial dependencies on a concatenated key
    • 3NF: No dependencies on non-key attributes
    • Boyce-Codd Normal Form (BCNF)
    • 4NF
    • 5NF
    • 6NF (Most recent form introduced in 2002)

Denormalization

  • The data is present in the same table so there is no need for any JOINS; hence the retrieval (selects) is very fast.
  • An Index usage on a single table is much more efficient, and thus has fast retrieval.
  •  Since the data is duplicated therefore the update, insert and delete become complex and costly.

No comments:

Post a Comment