QR CookingNotes

CookingNotes

Your Personal Recipe Book

Get it on Google Play
QR FiNoteMe

FiNoteMe

Smart Finance Tracker

Get it on Google Play
database Database normalization is the process of organizing your tables so your data stays clean, consistent, and free from duplication. This tutorial explains 1NF, 2NF, and 3NF in a very simple, friendly way so beginners can finally understand why messy tables cause problems—and how normalization fixes them.

Beginner's Guide to Database Normalization (1NF, 2NF, 3NF Explained Simply)

5 Min Read Verified Content

Let’s be real:
The first time someone hears “normalization,” it sounds like some advanced scientist-level database thing.

But in reality?

Normalization is just a fancy word for:

👉 Cleaning up your tables so they don’t become a disaster later.

That’s it.

If your table is messy, duplicated, or confusing, normalization helps you break it down into smaller, cleaner pieces.

Let’s walk through this SLOWLY and CLEARLY.




⭐ Why Do We Normalize a Database?

Imagine you store customer orders like this:


order_idcustomer_namephoneproductprice
1Alice555-111Laptop1200
2Alice555-111Mouse25
3Bob555-222Keyboard50


Problems:

  • Customer data is repeated many times

  • If Alice changes her phone number, you must update it everywhere

  • Inconsistent values might appear

  • The table becomes huge and hard to maintain

Normalization solves this by breaking the table into smaller ones.




⭐ What Normalization Levels Should Beginners Care About?

There are many forms (BCNF, 4NF, 5NF...)
But beginners only need to learn:


  • 1NF – First Normal Form

  • 2NF – Second Normal Form

  • 3NF – Third Normal Form


These three are enough to make you look smart and design clean databases.



⭐ 1NF – First Normal Form


Rule:
👉 Each column must contain single values (no lists or groups).
👉 No repeated groups.
👉 Every row must be unique.


❌ Bad Example (NOT in 1NF)

order_idproducts
1Laptop, Mouse, Keyboard

The products column contains multiple values.


✔ Good Example (1NF)

order_idproduct
1Laptop
1Mouse
1Keyboard


Now each cell contains one value only.

1NF is simply: keep columns atomic and avoid multi-value cells.



⭐ 2NF – Second Normal Form


Before applying 2NF, your table must already follow 1NF.

Rule:

👉 No partial dependency.
👉 If a primary key is made of two columns, all other columns must depend on BOTH.


Let’s break it down simply.

Imagine a combined primary key:
(order_id, product_id)


❌ Bad (NOT in 2NF)

order_idproduct_idcustomer_name
1101Alice
1102Alice


Problem:

  • customer_name depends on order_id

  • But it does NOT depend on product_id


So we split it.

✔ Good (2NF)


Table: orders

order_idcustomer_name
1Alice


Table: order_items

order_idproduct_id
1101
1102


Now each table stores only what ACTUALLY belongs there.




⭐ 3NF – Third Normal Form


Must already satisfy 1NF and 2NF.

Rule:

👉 No transitive dependencies.
A non-key column must NOT depend on another non-key column.

Simple version:

“If column A depends on column B, and column B depends on the key — move column A to another table.”


Example:

customer_idnamecitypostal_code
1AliceLondonE1 4NS


City and postal_code are related.
postal_code → determines the city.

This is a “chain dependency.”


❌ Bad (NOT in 3NF)

postal_code depends on the customer’s address, not on the customer_id.

✔ Good (3NF)


Table: customers

customer_idnamepostal_code
1AliceE1 4NS

Table: locations

postal_codecity
E1 4NSLondon


Result:
Data is clean, flexible, and consistent.




⭐ Putting It All Together (Simple Summary)

1NF:

  • No repeating groups

  • No multi-value cells

  • Rows are unique


2NF:

  • No partial dependency

  • Every non-key column depends on the FULL primary key


3NF:

  • No transitive dependency

  • No non-key column depends on another non-key column

Once your database hits 3NF, it’s clean enough for 90% of real applications.


⭐ Real World Example (Full Table Breakdown)


Before Normalization (Single messy table):


order_idcustomer_namephoneproductprice
1Alice555-111Laptop1200
2Alice555-111Mouse25


After Normalization (3NF):

customers

customer_idnamephone
1Alice555-111


products

product_idproductprice
1Laptop1200
2Mouse25


orders

order_idcustomer_id
11
21


order_items

order_idproduct_id
11
22

This structure is cleaner, scalable, and industry-standard.


⭐ Why Normalization Matters


  • Reduces data duplication

  • Makes updates easier

  • Prevents inconsistent data

  • Keeps your tables small and efficient

  • Improves query performance

  • Makes your database easier to maintain

Every beginner web developer, backend developer, or database engineer must know normalization basics.


Advertisement
Back to Database