This tutorial introduces the concept and principles of database normalization and takes you through the most common normal forms.
The store contains a "customer_order" table that has the complete details of all transactions made by the customers in the store like transaction order, product and customer information. The table has duplicate entries for customer and product information.
Disorganized and redundant data leads to performance degradation as well as difficulties in administration of the database. It also leads to anomalies during insert, update, delete operations and hence data corruption.
In order to eliminate data redundancy and assist in database administration and maintainence, the "customer_order" table is subjected to normalization.
Normalization is a process in which an initial DB design is transformed, or decomposed, into a different, but equivalent, design. The resulting schema is equivalent to the original one in the sense that no information is lost when going from one to the other. There are a few goals for deploying a normalized design :
It is possible to transform an original schema into a resulting one that satisfies certain conditions, known as Normal Forms :
key
uniquely determines a record. A composite key
is one consisting of several fields or columns)There are three more normal forms namely the Boyce-Codd Normal form (BCNF), Fourth Normal form (4NF) and Fifth Normal form (5NF). These are rarely used, hence not discussed in this tutorial.