Normalize a database schema
Normalization reduces data redundancy and improves integrity. Learn 1NF, 2NF, 3NF, and BCNF with practical examples.
- 1
Normalization forms: 1NF (atomic values, no repeating groups), 2NF (1NF + no partial dependencies on composite keys), 3NF (2NF + no transitive dependencies), BCNF (3NF + every determinant is a candidate key). Each form reduces redundancy and update anomalies. Most practical applications use 3NF or BCNF.
- 2 SQL Formatter →
Format the schema DDL (CREATE TABLE statements) to review the structure. Look for: repeating groups (violates 1NF), partial key dependencies (violates 2NF), non-key dependencies (violates 3NF). Format makes the schema structure and relationships clear.
- 3 Table Editor & Converter →
Visualize the table structure and relationships. Identify redundant data (same information stored in multiple places) and functional dependencies (which columns determine which). This helps identify which normal form the schema satisfies and what to fix.
Frequently asked questions
- Should I always normalize to 3NF?
- For OLTP (transactional) systems, yes — 3NF/BCNF reduces redundancy and anomalies. For OLAP (analytical) systems, denormalization (star/snowflake schema) is preferred — fewer joins, faster queries. The trade-off: normalization improves write efficiency and integrity; denormalization improves read performance.
- What are update anomalies?
- In unnormalized schemas: insertion (cannot add a department with no employees), deletion (deleting the last employee loses the department), update (changing a department name requires updating all employee rows). Normalization eliminates these by separating concerns into different tables.
Workflows that solve this
Learn more
Want to understand why?