← Lessons

quiz vs the machine

Silver1120

Databases

Linearizability vs Serializability

Two strong guarantees that sound alike but constrain different things, one about real time order and one about transaction outcomes.

5 min read · intro · beat Silver to climb

Two Different Promises

These guarantees are often confused, yet they answer different questions.

  • Linearizability is about single operations on a single object. It promises that every operation appears to take effect at one instant between its start and finish, and that this order respects real time. Once a write completes, every later read sees it.
  • Serializability is about whole transactions over many objects. It promises that the result of running transactions concurrently equals some serial order of those transactions, but it says nothing about which order or about real time.

Why the Difference Matters

A serializable system may pick an equivalent serial order that does not match wall clock order. Transaction B could commit after A in real time yet be ordered before A. That is allowed, because serializability only cares that some serial order exists.

Combining Them

Strict serializability is the strong combination: a serial order that also respects real time across transactions. It is the gold standard but the hardest to scale, since it needs global coordination.

Key idea

Linearizability orders single operations by real time, serializability orders whole transactions in some equivalent serial order, and together they give strict serializability.

Check yourself

Answer to earn rating on the learn ladder.

1. What does linearizability constrain?

2. What does serializability allow that linearizability does not?

3. What is strict serializability?