A database schedule that can be turned into a serial database schedule by swapping adjacent operations of different database transactions that do not conflict. Reads and writes of the same object conflict when at least one is a write.
Database precedence graph 2026-10-31
A directed graph with a vertex for each database transaction and an edge from the earlier to the later participant in each conflicting pair of operations. A database schedule is a conflict-serializable database schedule exactly when this directed graph has no directed cycle.
Database transaction Created 2026-10-31 Updated 2026-11-05
A database transaction groups database operations into a unit that can be committed or rolled back. Transaction atomicity means that its updates take effect together or not at all. Transaction durability concerns retaining an acknowledged committed result after a failure; transaction isolation controls which effects concurrent database transactions may observe.[ref]
For example, transferring seven units from an account with balance twenty to one with balance five should produce balances thirteen and twelve. A failure after only the debit must not leave thirteen and five as a completed transfer. In SQL, a transaction block uses BEGIN, then the related updates, then COMMIT; ROLLBACK abandons the uncommitted changes.[ref]
Isolation is a separate question from grouping statements. Two concurrent transfers can each read an old balance before either writes. A correct application must select suitable transaction isolation or locking and handle possible conflicts; merely putting the statements in a database transaction does not establish every desired invariant. The corresponding database schedule records their interleaving.
A serial database schedule is obtained by running the three database transactions in the order :
A genuinely interleaved conflict-serializable database schedule with the same serial order is
The early conflicts with nothing: all accesses to are reads. The conflicts on give edges , and in the database precedence graph, while the writes to give the already present edge . This database precedence graph has no directed cycle and admits the order . Moving the early after swaps it only past non-conflicting operations, recovering the displayed serial database schedule.
For a database schedule that is not a conflict-serializable database schedule, take
On , before forces . On , before forces . The resulting directed cycle prevents any serial ordering from preserving all conflicts. Each of the three displayed database schedules preserves the operation order inside every database transaction.
Serial database schedule 2026-10-31
A database schedule in which every database transaction runs as one contiguous group, without interleaving another database transaction.