Database Normalization

Learn 1NF, 2NF, and 3NF by transforming messy tables into well-structured databases step by step.

Category: Databases · v1.0.0
Step 1 of 6

Step 1: Why Normalize?

Imagine you're managing a school database. You create one big table to track everything — students, their courses, and instructor details. It seems convenient at first, but look at the problems:

orders (denormalized)

order_id customer cust_email cust_city items total

Problems in this table:

Redundancy: Alice's name, email, and city are repeated in every row she appears in. If she has 100 orders, her info is stored 100 times.
Update Anomaly: If Alice moves to a new city, you must update every single row. Miss one and the data is inconsistent.
Delete Anomaly: If you delete Bob's only order (#103), you lose all of Bob's customer information entirely.
Insert Anomaly: You can't add a new customer without creating a fake order first, because order_id is required.
Multi-valued cells: The "items" column contains comma-separated values ("Laptop, Mouse"). This violates the principle of atomic values.

Normalization systematically eliminates these problems by organizing data into well-structured tables. Let's see how it works through three progressive normal forms.

About This Lab

Database normalization eliminates redundancy and ensures data integrity. In this lab, you'll start with a denormalized table full of problems, identify anomalies, apply First Normal Form, Second Normal Form, and Third Normal Form step by step, and see how a clean schema emerges — all with interactive table transformations.

How It Works

  1. Read each step's explanation of normalization rules
  2. Identify problems in the example tables
  3. Watch tables transform as you apply each normal form
  4. Understand the trade-offs of normalization
  5. Complete the quiz to test your understanding