Databases • MySQL • SQL Server
Complete Database Normalization Step-by-Step
March 1, 2023
Normalization is the process of eliminating redundancies and decomposing relations with anomalies to produce smaller, well-structured relations. In this lecture, we will learn the concepts and processes of normalization. Then we will do a step-by-step walkthrough to normalize an unnormalized table.
First Normal Form (1NF)
- In all tables look for redundant data.
- If any, move column(s) into a new table.
- All tables must have a primary key set. If there is none, create one.
Second Normal Form (2NF)
- Tables must meet 1NF
- Look at only tables with a composite primary key.
- For those tables, the non-primary key columns must depend on the whole composite primary key.
Third Normal Form (3NF)
- Tables must meet 2NF
- Look at all tables and non-primary key columns
- Those columns must NOT be dependent on another non-primary key column