Schedules and Their Types

A schedule is the actual sequence in which the reads and writes of one or more concurrent transactions are executed. A serial schedule runs each transaction fully before the next, which is always safe but gives up concurrency, while a serializable schedule interleaves operations yet produces the same result as some serial order.

3 min read

A schedule is the actual sequence in which individual operations (reads and writes) from one or more transactions get executed. When only one transaction runs at a time, there's exactly one obvious schedule. When multiple transactions run concurrently, their individual operations can interleave in many different possible orders, and a schedule is simply whichever specific interleaving actually happened.

Serial schedules

A serial schedule runs every operation of one transaction to completion before starting the next transaction at all, no interleaving whatsoever. Serial schedules are always safe by definition (there's no concurrency to cause interference), but they give up all the performance benefit of running transactions concurrently.

T1: R(A), T1: W(A), T1: COMMIT, T2: R(A), T2: W(A), T2: COMMIT

Concurrent (interleaved) schedules

A concurrent schedule interleaves operations from multiple transactions:

T1: R(A), T2: R(A), T1: W(A), T2: W(A), T1: COMMIT, T2: COMMIT

This is where real performance comes from, but also where correctness risk enters, an interleaved schedule might produce a result no serial ordering of the same transactions could ever produce, which is a genuine bug.

Serializable schedules: the safe category of concurrent schedules

A serializable schedule is a concurrent schedule that, despite the interleaving, produces the exact same result as some serial execution of those same transactions would have. This is the real goal: get the performance benefit of concurrency, while guaranteeing the result is exactly as if the transactions had somehow run one at a time.

A worked example

T1: R(A), T2: R(A), T2: W(A), T1: W(A), T1: COMMIT, T2: COMMIT

Here, T1 reads A's original value, then T2 reads and writes A, then T1 writes A based on the value it read before T2's write ever happened, T1's write effectively overwrites T2's, ignoring it entirely. This particular interleaving is not equivalent to either serial order (T1-then-T2 or T2-then-T1), so it's a non-serializable schedule, and it's genuinely unsafe: T2's update was silently lost.

Where this matters in real systems

Database concurrency control mechanisms (locking protocols, timestamp ordering, optimistic concurrency control) exist specifically to guarantee that whatever schedule actually gets produced under real concurrent load is always serializable (or at least satisfies whatever weaker isolation level the transaction requested), never an unsafe interleaving like the lost-update example above. The database's job is to allow real concurrency for performance while mathematically guaranteeing the outcome is always equivalent to some safe serial order.

What interviewers actually ask about schedules

  • "What is a schedule?" The actual sequence in which operations from one or more transactions get executed.
  • "What's the difference between a serial and a serializable schedule?" A serial schedule runs transactions one fully after another with no interleaving; a serializable schedule interleaves them but still produces a result equivalent to some serial order.
  • "Why not just always use serial schedules to guarantee correctness?" They give up all the performance benefit of concurrency, real systems need transactions to run simultaneously for acceptable throughput.
  • "How would you recognize a non-serializable schedule?" Check if the result matches any possible serial ordering of the same transactions; if no serial order produces the same outcome, the schedule isn't serializable and is unsafe.

Key takeaways

  • A schedule is the actual order operations from concurrent transactions get executed in.
  • Serial schedules run transactions one fully after another, always safe but with no concurrency benefit.
  • Serializable schedules interleave transactions but still produce a result equivalent to some serial order, the real safety target.
  • Concurrency control mechanisms exist to guarantee whatever schedule actually occurs is serializable, preventing unsafe interleavings.
All 174 DBMS interview questions

Log in to save which topics you've read across every subject.

Frequently asked questions

What is a schedule?

The actual sequence in which operations from one or more transactions get executed.

What's the difference between a serial and a serializable schedule?

A serial schedule runs transactions one fully after another with no interleaving; a serializable schedule interleaves them but still produces a result equivalent to some serial order.

Why not just always use serial schedules to guarantee correctness?

They give up all the performance benefit of concurrency, real systems need transactions to run simultaneously for acceptable throughput.

How would you recognize a non-serializable schedule?

Check if the result matches any possible serial ordering of the same transactions; if no serial order produces the same outcome, the schedule isn't serializable and is unsafe.