Understanding Database Normalization: The Normal Forms

When designing a database, one of the most important goals is to organize data in a way that minimizes redundancy, improves consistency, and makes updates easier. Database normalization is the process of structuring data according to a set of rules known as normal forms.

Normalization helps answer a simple question:

"Where should a piece of information be stored so that it exists in exactly one place?"

Without normalization, databases often suffer from duplicated data, inconsistent values, and difficult maintenance. With normalization, data becomes easier to manage and relationships between entities become clearer.

Why Normalize Data?

Consider a simple table containing information about people, organizations, and roles:

PersonOrganizationRole
Bob SmithAcme CorpEngineer
Bob SmithMakers GuildTreasurer
Jane JonesAcme CorpManager

This structure looks simple at first, but problems quickly emerge:

  • A person's name may be repeated dozens of times.
  • An organization's name must be updated everywhere if it changes.
  • Deleting the last role for an organization may accidentally remove the organization itself.
  • Adding a new organization requires creating a dummy record.

Normalization addresses these problems by separating data into logical entities and defining relationships among them.


First Normal Form (1NF)

A table is in First Normal Form when:

  • Every column contains a single value.
  • No repeating groups exist.
  • Each row can be uniquely identified.

Not 1NF

PersonRoles
Bob SmithEngineer, Treasurer

The Roles field contains multiple values.

1NF

Person IDPerson Name
1Bob Smith
Person IDRole
1Engineer
1Treasurer

Each field now contains only one value.

Drupal Example

A multi-value field in Drupal may appear as multiple database rows behind the scenes rather than a comma-separated list in a single column.


Second Normal Form (2NF)

A table is in Second Normal Form when:

  • It is already in 1NF.
  • Every non-key column depends on the entire primary key.

This issue usually appears in tables with composite keys.

Not 2NF

Person IDOrganization IDOrganization Name
110Acme Corp
210Acme Corp

Organization Name depends only on Organization ID, not on the entire key.

2NF

Organizations table:

Organization IDOrganization Name
10Acme Corp

Membership table:

Person IDOrganization ID
110
210

Organization information is stored once and referenced through keys.


Third Normal Form (3NF)

A table is in Third Normal Form when:

  • It is already in 2NF.
  • Non-key columns depend only on the primary key.
  • No transitive dependencies exist.

A transitive dependency occurs when one non-key column determines another non-key column.

Not 3NF

Person IDZip CodeCity
155402Minneapolis

City depends on Zip Code, not directly on Person ID.

3NF

People table:

Person IDZip Code
155402

Zip table:

Zip CodeCity
55402Minneapolis

The dependency chain has been removed.


Boyce-Codd Normal Form (BCNF)

BCNF is a stricter version of Third Normal Form.

A table satisfies BCNF when:

  • Every determinant is a candidate key.

Most practical databases that reach 3NF also satisfy BCNF, though edge cases involving overlapping candidate keys can require additional decomposition.

BCNF is especially important when a business rule allows multiple candidate keys that each uniquely identify a record.


Fourth Normal Form (4NF)

A table is in Fourth Normal Form when:

  • It is already in BCNF.
  • Independent many-to-many relationships are stored separately.

Not 4NF

PersonHobbyLanguage
BobPaintingEnglish
BobPaintingFrench
BobMusicEnglish
BobMusicFrench

The hobbies and languages are unrelated, yet every combination must be stored.

4NF

Person Hobbies:

PersonHobby
BobPainting
BobMusic

Person Languages:

PersonLanguage
BobEnglish
BobFrench

The duplicated combinations disappear.


Fifth Normal Form (5NF)

A table is in Fifth Normal Form when:

  • It is already in 4NF.
  • Complex many-way relationships can be reconstructed from simpler relationships without introducing incorrect records.

5NF addresses rare situations involving three or more entities with intricate join dependencies.

Most business applications never require deliberate design beyond 4NF.


Domain-Key Normal Form (DKNF)

DKNF represents the theoretical ideal.

A database is in DKNF when every constraint is enforced entirely through:

  • Domain definitions
  • Key definitions

No additional business rules are required to ensure data integrity.

In practice, very few systems achieve full DKNF because business logic often extends beyond simple domains and keys.


A Practical Example

For a site such as Cheddar2, a normalized model might include separate entities for:

  • People
  • Organizations
  • Places
  • Events
  • Artifacts
  • Roles
  • Taxonomy terms

Relationships would be stored independently:

People

  • Bob Smith
  • Jane Jones

Organizations

  • Acme Corp
  • Makers Guild

Roles

  • Engineer
  • Treasurer
  • Manager

Memberships

PersonOrganizationRole
Bob SmithAcme CorpEngineer
Bob SmithMakers GuildTreasurer
Jane JonesAcme CorpManager

In this design:

  • People are stored once.
  • Organizations are stored once.
  • Roles are stored once.
  • Relationships connect them.

This approach avoids duplication and allows a person, organization, or role to be updated in a single location.


The Trade-Off: Normalization vs. Convenience

Normalization improves:

  • Data consistency
  • Data integrity
  • Maintainability
  • Reuse of information

However, highly normalized databases can require many joins to assemble information for display.

Modern systems often use a balance:

  • Normalize operational data.
  • Denormalize selectively for reporting, caching, and search.

Drupal itself follows this philosophy. Content entities, taxonomy terms, users, and media are stored separately and connected through references, while search indexes and caches may contain denormalized data for performance.


Conclusion

Normalization is fundamentally about identifying entities and relationships, then storing each fact in exactly one place. First Normal Form eliminates repeating groups. Second and Third Normal Forms remove partial and transitive dependencies. Higher normal forms address increasingly specialized situations involving keys and relationships.

For most Drupal applications, designing entities and relationships thoughtfully and achieving Third Normal Form provides an excellent balance between flexibility, maintainability, and performance. When modeling a site such as Cheddar2, thinking in terms of people, places, organizations, events, and relationships naturally leads toward a well-normalized design that remains easy to extend as the content grows.

Project type

Comments

Permalink

Yes. In fact, I think your three bullet points are a better teaching tool than the formal definitions.

Normal FormFormal DefinitionPlain-English Version
1NFAtomic values, no repeating groupsDo cells hold one value?
2NFEvery non-key attribute depends on the whole keyDo facts live with the right entity?
3NFNo transitive dependenciesDo facts depend only on the key?

For example:

1NF – Do cells hold one value?

Bad:

PersonRoles
BobEngineer, Treasurer

Good:

PersonRole
BobEngineer
BobTreasurer

Each cell contains a single value.


2NF – Do facts live with the right entity?

Bad:

Person IDOrganization IDOrganization Name
110Acme Corp
210Acme Corp

The fact "Acme Corp" is really a property of the organization, not the person-organization relationship.

Good:

Organizations

Organization IDName
10Acme Corp

Memberships

Person IDOrganization ID
110
210

The organization fact now lives with the organization entity.


3NF – Do facts depend only on the key?

Bad:

Person IDZip CodeCity
155402Minneapolis

The city is not determined by Person ID. It is determined by Zip Code.

Dependency chain:

 

Person ID
    ↓
Zip Code
    ↓
City

 

Good:

People

Person IDZip Code
155402

Zip Codes

Zip CodeCity
55402Minneapolis

Now every fact in each table depends directly on that table's key.


As an architect, I often summarize normalization this way:

  • 1NF: One fact per cell.
  • 2NF: Put facts with the thing they describe.
  • 3NF: Store each fact exactly once.

Or even more briefly:

 

1NF: One value per cell.
2NF: Right fact, right entity.
3NF: No indirect dependencies.

 

That captures about 95% of what most developers and data modelers need to remember in practice. For a Drupal article aimed at a mixed technical audience, I'd actually lead with those three bullets before introducing the formal terminology. They are much more intuitive.