Schedules

For a set of transactions {T1,Tk} produces an execution order of operations S such that

  1. Every operation oiTi appears also in S
  2. Ti‘s operations in S are ordered the same way as in Ti

Goal

Produce a correct schedule with maximal parallelism

If Ti and Tj are concurrent transactions, then it is always correct to schedule the operations in such way that

  1. Ti will appear to precede Tj
    1. Tj will see all updates made by Ti
    2. Ti will not see any updates made by Tj
  2. Ti will appear to follow Tj
    1. Ti will see Tj‘s updates
    2. Tj will not see Ti‘s updates

Correct: Schedule appears to clients that the transactions are executed sequentially

Serializable Schedules

Equivalent to some serial execution of the same transactions

Conflict Equivalence

All conflicting operations for two schedules are ordered the same way

Two operations conflict if they

  1. Belong to different transactions
  2. Access the same data item x
  3. At least one of them is a write operation w[x]

Schedule S1 is a conflict serializable schedule if it is conflict equivalent to some serial schedule S2

View Equivalence

Preserves initial reads and final writes

  1. Allows more schedules
  2. Is NP-hard to diagnose

Serialization Graph

SG(N,E) for a schedule S is a directed graph

  1. Nodes TiN corresponding to the transactions of S
  2. Edges TiTjE whenever an operation oi[x] for transaction Ti occurs prior oj[x] for transaction Tj in S, where oi[x] and oj[x] are conflicting operations

Theorem: Schedule S is serializable if and only if the serialization graph SG for S is acyclic