Knowledgebase

Normalisation and When to Break It Print

  • 0

Structuring tables sensibly.

WHAT NORMALISATION IS

Organising data so each fact is stored once.

WHY IT MATTERS

Duplicated facts diverge, and updating them all is error-prone.

WHAT THE PRACTICAL RULES ARE

Each column holds one value Each column depends on the whole key Nothing depends on anything but the key

WHAT THAT MEANS IN PRACTICE

Repeating groups become separate tables Descriptions of one thing do not live in another thing's table

WHAT AN EXAMPLE OF THE PROBLEM IS

A customer's address stored on every order.

WHY IT IS A PROBLEM

Changing the address means changing every order, or accepting inconsistency.

WHEN THAT IS ACTUALLY CORRECT

When the historical value matters.

WHY

An invoice must show the address at the time, not the current one.

WHAT THAT ILLUSTRATES

Normalisation is about facts, and a historical record is a different fact.

WHAT DENORMALISATION IS

Deliberately duplicating data for speed.

WHEN IT IS JUSTIFIED

When a join is genuinely too expensive, and you have measured it.

WHAT IT COSTS

Keeping copies consistent, forever.

WHAT TO DO FIRST

Normalise, then denormalise only where evidence demands.

WHAT TO NEVER DO

Denormalise pre-emptively.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot