Normalization
Database normalization is the process of decomposing tables to eliminate redundancy and update anomalies, with normal forms from 1NF to BCNF/5NF growing stricter.
Purpose
To eliminate data redundancy and update anomalies (insert/delete/modify), guaranteeing data integrity.
Mechanism
1NF: atomic values. 2NF: eliminate partial dependencies (non-prime attributes fully depend on the key). 3NF: eliminate transitive dependencies. BCNF: every determinant is a candidate key. Normalization reduces redundancy but adds JOINs; balance against denormalization.
Use cases
- Relational database design
- Eliminating data redundancy
- Data integrity assurance
- Teaching and modeling
Examples
- Input
Split an orders table into orders + customers + productsOutput3NF eliminates redundancyTable decomposition
Common errors
- Over-normalization leads to excessive JOINs in queries
- Denormalize moderately for read-heavy scenarios
Related terms
Index
An index is an auxiliary data structure (e.g., B+ tree, hash) maintained to speed up queries, trading space for time at the cost of write overhead. GLOSSARY
JOIN
JOIN is the SQL operation combining rows of multiple tables by a join condition; types include inner, left/right/full outer, and cross joins. GLOSSARY
Primary Key
A primary key is the column or column combination that uniquely identifies each row in a table — non-null and unique; the row identity. GLOSSARY
Foreign Key
A foreign key is a column referencing the primary key of another table, establishing referential integrity between tables and preventing orphaned references. GLOSSARY