What is the difference between a serial schedule and a serializable schedule?
Interview preparation resource from Gate Smashers.
A serial schedule runs one transaction completely before another begins. A serializable schedule may interleave operations from multiple transactions, but its final effect must be equivalent to some correct serial order.
Definitions
A serial schedule runs one transaction completely before another begins. A serializable schedule may interleave operations from multiple transactions, but its final effect must be equivalent to some correct serial order.
Properties and trade-offs
A serial schedule is simple and safe because transactions never overlap. The disadvantage is poor concurrency: one transaction may keep others waiting even when some operations could safely run together. A serializable schedule allows concurrency while preserving the correctness expected from serial execution.
- Advantage: Serializable schedules provide higher concurrency while maintaining correctness equivalent to some serial order.
- Disadvantage: Serial schedules have low concurrency because transactions run one after another.
Relationship and correctness
Therefore, a schedule can be non-serial but still serializable. Not every concurrent schedule is serializable. The DBMS needs concurrency-control techniques to make sure interleaving does not produce an invalid result.
Practical implication
Use serial schedules when simplicity and absolute isolation are required, accepting low concurrency. Use serializable schedules to allow transactions to overlap while ensuring that the final state is equivalent to some serial execution, typically enforced by the DBMS’s concurrency-control mechanisms.
