Database Normalizer
Interactive guide to database normalization forms (1NF through 5NF/BCNF). Learn with visual examples showing denormalized data and properly normalized results.
All processing happens in your browser. No data is uploaded.
Database Normalizer
Interactive guide to database normalization forms (1NF through 5NF/BCNF). Learn with visual examples showing denormalized data and properly normalized results.
🔒All processing happens in your browser. No data is uploaded.
Normalization Forms Overview
1NF
2NF
3NF
BCNF
4NF
5NF
1NF
2NF
3NF
BCNF
4NF
5NF
Violation Example & Fix
Before (Denormalized)
| StudentID | Name | Courses |
|---|---|---|
| 1 | Alice | Math, Physics, Chemistry |
| 2 | Bob | English, Math |
| 3 | Carol | Biology, Chemistry, Physics |
After (Normalized)
StudentCourses
| StudentID | Name | Course |
|---|---|---|
| 1 | Alice | Math |
| 1 | Alice | Physics |
| 1 | Alice | Chemistry |
| 2 | Bob | English |
| 2 | Bob | Math |
| 3 | Carol | Biology |
| 3 | Carol | Chemistry |
| 3 | Carol | Physics |
SQL Examples
SQL Before (Violates Normal Form)
-- Violates 1NF: multi-valued column CREATE TABLE Students ( StudentID INT PRIMARY KEY, Name VARCHAR(100), Courses VARCHAR(500) -- comma-separated! );
SQL After (Normalized)
-- 1NF: Each cell has atomic values CREATE TABLE Students ( StudentID INT PRIMARY KEY, Name VARCHAR(100) ); CREATE TABLE StudentCourses ( StudentID INT, Course VARCHAR(100), PRIMARY KEY (StudentID, Course), FOREIGN KEY (StudentID) REFERENCES Students(StudentID) );
