What is Normalization?

A design procedure that splits relational database tables based on functional dependencies between columns so that the same fact is not recorded in several places. It removes duplicated data and prevents update, insertion and deletion anomalies. Its stages include first to third normal form and Boyce-Codd normal form.

Japanese name: 正規化

Normalization appears in 2 practice questions across 1 topic, including Database Basics.

Field: Database Basics

Anomalies prevented by normalization

In an unnormalized table, the same fact is recorded repeatedly in many rows. If every row of an employee table also holds the department name, for example, renaming a department requires rewriting every row of that department's employees, and missing any of them leaves the contents inconsistent (an update anomaly). A department with no employees yet cannot be registered (an insertion anomaly), and deleting a department's last employee erases the department's information as well (a deletion anomaly). Moving department information into a separate table records each fact in only one place and prevents these anomalies.

From first to third normal form

First normal form is the state in which every column holds a single, non-repeating value. Second normal form is first normal form with no column that depends on only part of the primary key (no partial functional dependency); this matters for tables whose primary key has several columns. Third normal form is second normal form with no column determined via a column other than the primary key (no transitive functional dependency). If there is a dependency such as order_no → cust_no → cust_name, for example, cust_no and cust_name are moved to a separate table. Tables are split so that joining them on their common columns restores the original table without losing information.

Balancing against denormalization

Normalization removes duplication, but splitting tables means joins are needed for every search. In databases used mainly for reading and aggregation, tables are sometimes deliberately merged and duplication reintroduced for performance; this is denormalization. It then requires a mechanism for updating the duplicated data consistently. Databases for transaction processing with many updates are generally normalized up to third normal form as a rule.

Try it: questions about Normalization

What is the main purpose of normalization of tables in a relational database?

  1. ATo reduce the number of tables so that any search can be done quickly without joins
  2. BTo encrypt data so that unauthorized users cannot read it
  3. CTo eliminate duplicated data and prevent anomalies such as contents becoming inconsistent after an update
Show answer and explanation

Answer: C. To eliminate duplicated data and prevent anomalies such as contents becoming inconsistent after an update

Normalization is a design procedure that splits tables based on functional dependencies between columns (a relationship in which the value of one column determines the value of another) so that the same fact is not recorded in several places. For example, if every row of an employee table also holds the department name, renaming a department requires rewriting every row of that department's employees, and missing any of them leaves the contents inconsistent (an update anomaly). Other problems arise as well: a department with no employees yet cannot be registered (an insertion anomaly), and deleting the last employee of a department also erases the department's information (a deletion anomaly). If department information is moved into a separate department table, a department name needs to be corrected in only one place. On the other hand, splitting tables means more joins when searching, so normalization does not necessarily make searches faster.

FAQ

What is the difference between second and third normal form?

Second normal form has no column determined by only part of the primary key (no partial functional dependency). Third normal form additionally has no column determined via a column other than the primary key (no transitive functional dependency). A table with a single-column primary key is automatically in second normal form if it is in first normal form.

Does normalization make searches faster?

Not necessarily. The purpose of normalization is to remove duplication and prevent anomalies when updating; splitting tables means more joins for searches. When read performance is important, tables are sometimes deliberately denormalized.

Normalization in the explanations

Questions that mention Normalization (2)

  1. What is the main purpose of normalization of tables in a relational database?
  2. In a database used mainly for reading and aggregation, normalized tables are sometimes deliberately merged into one so that the same data is held in duplicate (denormalization). Which correctly pairs an advantage and a disadvantage of this design?

Books on Database Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

Relational database Transaction ACID properties Database index Database view E-R diagram Foreign key Isolation level NoSQL Primary key

Back to the glossary