Lesson 15: Normalization: 1NF, 2NF, 3NF
16 Jul 2026 1 min Swarnil Singhai
Normalization organizes tables to eliminate redundant data — each fact stored exactly once, referenced by key everywhere else.
Real-time example
Instead of repeating a customer's full address on every order row, orders just store customer_id and the address lives once in customers.
-- Denormalized (bad): repeats customer_name/email on every order
-- Normalized (good):
CREATE TABLE customers (id SERIAL PRIMARY KEY, name TEXT, email TEXT);
CREATE TABLE orders (
id SERIAL PRIMARY KEY,
customer_id INT REFERENCES customers(id),
amount NUMERIC
);
What's happening
If a customer changes their name, normalized data means updating one row in customers — denormalized data would mean updating every order row too.
Normalize by default; deliberately denormalize later only where you've measured a real read-performance need.
Advertisement