jargon

Comparison

DenormalisationvsNormalisation

Denormalisation

you copy the customer's name into the orders table so the list page stops doing a join on every render.

Deliberately duplicating data to avoid joins or aggregate computation on the read path. It is the standard fix once a hot query's join cost dominates, and it is how most read models are built. The duplicated field is now yours to keep in sync forever, so it only pays where reads vastly outnumber writes.

Full entry →

Normalisation

you store the customer's address in exactly one table so that changing it cannot leave four stale copies behind.

Structuring tables so each fact is stored once, with relationships expressed by keys rather than repetition. It makes writes correct by construction: there is no second copy to forget. The cost is joins on the read path, which is why every normalised schema eventually meets a report that needs six of them.

Full entry →

Related comparisons