Skip to content

Database Normalization vs Denormalization: When to Use Each

Two linked tables on one side and a single combined wide table on the other.

Database normalization and denormalization pull in opposite directions. Normalization splits data into separate related tables so each fact is stored once, and denormalization deliberately repeats or pre-combines data so reads are simpler and faster. Which one you want depends on whether the database is mostly written to or mostly read from.

What normalization means

A normalized design stores each piece of information in one place. Instead of repeating a customer’s name and address on every order row, you keep customers in one table and orders in another, and link them with a key. That removes redundancy, saves space, and means a change, such as a new address, is made in exactly one row.

The normal forms in plain language

Normalization is usually described in steps called normal forms. First normal form requires that each cell holds a single value, not a list. Second normal form requires that every non-key column depends on the whole key, not just part of a composite key. Third normal form requires that non-key columns depend only on the key and not on each other, so a customer’s city should not be stored on an order if it can be found from the customer. Each step removes a kind of duplication that causes update problems.

A small example

Imagine one table of orders that repeats the customer name and city on every row. If a customer moves, you must update every one of their orders, and missing one leaves the data contradicting itself. Normalizing it into customers and orders tables fixes this: the city lives in one place. The cost is that reading an order with its customer’s city now needs a join, which is covered in SQL joins explained.

What denormalization means

Denormalization goes the other way: it stores some data redundantly, or combines tables in advance, so common queries need fewer joins. A reporting table that already includes the customer’s name and city on each order row is denormalized. Reads become simpler and often faster, at the price of extra storage and the need to keep the copies consistent.

Where each one fits

Transactional systems, which handle many small inserts and updates, usually favor normalized designs, because consistency and cheap updates matter most. Analytical systems, which run large read queries over history, usually favor denormalized designs, because fewer joins make queries simpler and faster. This is why a star schema, with a central fact table and flattened dimension tables, is a deliberately denormalized model, while a snowflake schema normalizes the dimensions further.

The risks of denormalizing

When the same fact lives in several places, those copies can drift apart, producing update anomalies. You then need a clear rule for which copy is the source of truth, and a process that refreshes the rest. Tracking changes over time adds another layer, handled by patterns such as slowly changing dimensions.

Performance is not one-sided

It is tempting to say denormalized data is always faster, but that is not guaranteed. A well-indexed normalized schema can answer many queries quickly, as explained in SQL indexes, and on analytical platforms the storage format and partitioning often matter more than the join count. Measure real queries on realistic data before restructuring a schema for speed.

A different meaning of the word

In machine learning, normalization means rescaling numeric features, which is an unrelated idea. If that is what you are looking for, see normalization vs standardization.

How to choose

  1. Is the system mostly writing data, or mostly reading it?
  2. How costly would inconsistent copies of a fact be?
  3. Do your frequent queries need many joins?
  4. Do you have a process to keep denormalized copies in sync?
  5. Have you measured the query, instead of assuming denormalizing will help?

If you are designing a warehouse model and want a second opinion, see my cloud data warehousing service, and for platform choices read data warehouse vs data lake vs lakehouse.

FAQ

What is the difference between normalization and denormalization?
Normalization splits data into related tables so each fact is stored once. Denormalization stores some data redundantly or pre-joins tables to make reads simpler and faster.

Is a data warehouse normalized or denormalized?
Analytical warehouses are usually modeled in a denormalized way, such as a star schema, because it makes large read queries simpler. The right shape still depends on your workload.

How many normal forms are there?
The commonly taught ones are first, second and third normal form, with stricter forms such as Boyce-Codd normal form beyond them. Most practical designs aim for third normal form.

Related posts

Leave a comment

Your email address will not be published. Required fields are marked *