Database Normalization

Measurement
Introduced by
Edgar F. Codd
Year
1970
Type
Data organization methodology
Family
Schema Design & Data Organization

What does it do?

Database normalization is a systematic procedure for organizing the tables of a relational database so that redundancy is reduced and data integrity is easier to enforce.

It is defined through a sequence of normal forms, from First Normal Form (1NF) to Boyce-Codd Normal Form (BCNF), each of which rules out a specific structural or dependency problem within a table. The relational model and the normal-form concept are due to Edgar Codd, whose 1970 paper is the primary reference.

The intuition behind the method

The goal is to record each fact in one place wherever the design allows. When a fact is repeated, an update to one copy can leave the others out of date, and deleting a row can remove facts that were stored only there. Normalization addresses this by splitting tables according to the functional dependencies between attributes, so that a change to one entity affects only the table that describes it. Normalization reduces redundancy but does not always remove every repetition, since some repetition may be needed for keys or for performance.

History

Edgar Codd's 1970 paper introduced the relational model based on n-ary relations, together with a normal form for data base relations and an approach to redundancy and consistency in the user's model. The specific definitions of Second and Third Normal Form were developed in Codd's subsequent work on further normalization (1971). Boyce-Codd Normal Form is commonly attributed to Boyce and Codd as a stricter form than 3NF.

When to use it

Choose normalization when the database is relational, data is written and updated frequently, and several users or processes change related records, since these are the conditions under which update anomalies cause errors. It is also suitable when the functional dependencies among attributes can be stated and are reasonably stable, because the procedure cannot be applied without them. Do not apply it rigidly to read-heavy analytical stores, such as reporting or warehouse tables, where the extra joins of a fully normalized design are costly and denormalized structures are often built deliberately. It is also not the right design method when the underlying data model is not relational.

Limitations and considerations

  • The result depends on knowing the functional dependencies in advance; incomplete or incorrect dependencies produce a schema that is normalized on paper but still inconsistent in practice.
  • Each decomposition spreads data across more tables, so reads that need related facts usually require joins, which can cost performance on large data sets.
  • Some dependency structures cannot be decomposed into BCNF while preserving every dependency, so a designer may have to accept a lower normal form for that part of the schema.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Removes the update, insertion and deletion anomalies that the normal forms are defined to address, and each violation can be checked against a named rule.
  • Gives a formal criterion for each table, based on its functional dependencies, so design disagreements can be settled by testing the dependencies rather than by judgement alone.
  • Reduces repetition of the same values across rows, which lowers storage use and the number of places a correction must be made.

Applications

  • Order-entry systems in which each customer's details are stored once and referenced by key from every order, so an address change is made in one row.
  • Banking account and transaction tables, where an account attribute depends on the account key and is not copied into each transaction without a rule for keeping the copies current.
  • Library catalogues that record a book's title and author once, with separate tables for physical copies, loans and patrons.
  • Employee databases that keep department details in a department table rather than repeating them on every employee record.

How it works

How it works

1

List the attributes, entities and relationships the database must represent, together with the business rules that govern them.

2

Determine the functional dependencies among attributes and identify the candidate keys that uniquely determine each entity. Confirm each dependency against the business rules and by profiling the data. A dependency that holds in current sample data is not proof that it holds generally, so it should be checked against the rules the data is meant to satisfy. Every later step depends on these dependencies, so errors made here carry forward.

3

Test each table against the criteria of the normal forms in turn, starting with 1NF. 1NF requires that every attribute hold atomic values and that the table contain no repeating groups. 2NF requires that no non-key attribute depend on only part of a candidate key, which matters only for tables with composite keys. 3NF requires that every non-key attribute depend directly on a candidate key, not through another non-key attribute. BCNF requires that every nontrivial functional dependency have a superkey as its determinant. For example, a table Enrolment(StudentID, CourseID, StudentName, Grade) with candidate key {StudentID, CourseID} violates 2NF, because StudentName depends on StudentID alone.

4

Decompose each violating table into smaller tables, each holding attributes that depend on the same determinant, and link them through keys. The decomposition must be chosen so that the original data can still be recovered. In the 2NF example from the analysis step, Enrolment is split into Student(StudentID, StudentName) and Enrolment(StudentID, CourseID, Grade), linked by StudentID.

5

Check that the decomposition is lossless, meaning the original table can be rebuilt by joining the parts, and that dependencies are preserved where the target normal form requires it. BCNF decomposition does not always preserve every dependency, so this check can force a choice of a lower normal form for part of the schema.

Common pitfalls

  • Stopping at the wrong level: 3NF or BCNF is often a practical target, but dependency types these forms do not cover, such as multivalued dependencies addressed by 4NF, can still produce redundancy. Whether to go further should follow from the dependencies actually present in the data.
  • Normalizing without reference to query patterns: a design that is correct on paper may make the most frequent reports slow, and this cost should be measured rather than assumed.
  • Denormalizing without a recorded rule: when a table is intentionally denormalized for a high-volume read path, the duplicated fields need an explicit rule that keeps them consistent, or the anomalies that normalization removed will return.

Frequently asked questions

What is the difference between 2NF, 3NF, and BCNF?

2NF eliminates partial dependencies (non-key attributes depending on part of a composite key). 3NF eliminates transitive dependencies (non-key attributes depending on other non-key attributes). BCNF is stricter than 3NF, requiring every determinant to be a superkey.

Is it always necessary to normalize to 3NF or higher?

No. Many systems normalize to 3NF as a practical balance. Higher forms like BCNF may be required for specific consistency guarantees, while some analytical systems intentionally denormalize for performance.

How do I identify functional dependencies in my data?

Analyze your domain rules: ask what attributes uniquely determine other attributes. For example, StudentID determines StudentName, or ProductID determines Price. Document these relationships explicitly before designing tables, and check them against sample data without assuming that data alone proves them.

Does normalization always improve performance?

No. Normalization mainly improves the consistency of updates. Splitting tables can add joins to reads and extra index maintenance to writes, so its effect on speed depends on the workload and should be measured. Profile your actual query patterns; where reporting queries are slow, strategic denormalization in reporting tables can help, provided the duplicated fields follow an explicit rule that keeps them consistent.

Related methods

Sources

  1. Codd, E. F. (1970). A relational model of data for large shared data banks. Communications of the ACM, 13(6), 377-387.

    Open DOI reference
  2. Codd, E. F. (1971). Further normalization of the data base relational model. IBM Research Report RJ892.

    Open publication reference
  3. Boyce, R. F., Chamberlin, D. D., King, W. F., & Hammer, M. M. (1975). Specifying and enforcing integrity constraints in SQL. SIGMOD Record, 5(4), 70-77.

    Open publication reference