intermediatedbms

Normalization

The art of organizing your tables so data doesn't contradict itself.

Key Points

What it is

Normalization is the process of structuring database tables to reduce redundancy and prevent data anomalies. It works by applying a series of rules called normal forms, each one stricter than the last. The goal is to store each fact exactly once.

Why it exists

When the same data lives in multiple places, updates become a problem. You update a customer's email in one row but forget it in three others — now the database disagrees with itself. Normalization prevents this by making sure each piece of information lives in exactly one place.

Intuition

Say you have an orders table with columns: order_id, customer_name, customer_email, product_name, product_price. Everything in one big flat table. Now a customer changes their email. You have to update every row with their name. Miss one, and you have two different emails for the same customer. A product changes price? Same problem. This is called an update anomaly. Normalization says: customer info goes in a customers table. Product info goes in a products table. Orders just stores the IDs that point to those tables. Now an email change is one row in one table. Done.

Example

Unnormalized: OrderID | CustomerName | CustomerEmail | ProductName | ProductPrice 1 | Alice | alice@x.com | Notebook | 5.00 2 | Alice | alice@x.com | Pen | 1.00 Normalized: Customers(customer_id, name, email). Products(product_id, name, price). Orders(order_id, customer_id, product_id).

In the normalized version, Alice's email is stored once. If she changes it, one update fixes it across all her orders.

When to use

When not to use

Common mistakes

Notes

In practice

Normalization shapes what your raw source tables look like when you pull from a production database. Understanding it helps you write correct joins and understand why certain columns live in separate tables. In analytics engineering (dbt, data modeling), you're often doing the opposite — denormalizing normalized source data into analytical models.

Was this concept helpful?

Spot an error or gap? Suggest an edit →

Related concepts

relational-modelsql-basicsetl-pipelinesstar-and-snowflake-schema
Chirp at me!