Lably
Skip to content

Database transaction schedule

Order of execution of transactions in transaction processing

  • 9 min read
  • 4 chapters

Related on Lably

Through Database, Execution (computing) and Order of operations

Schedules are fundamental concepts in database concurrency control theory. In practice, most general purpose database systems employ conflict-serializable and strict recoverable schedules.

Notation

Grid notation:

  • Columns: The different transactions in the schedule.
  • Rows: The time order of operations (a.k.a., actions).

Operations (a.k.a., actions):

  • R(X): The corresponding transaction "reads" object X (i.e., it retrieves the data stored at X). This is done so that it can modify the data (e.g., X=X+4) during a "write" operation rather than merely overwrite it. When the schedule is represented as a list rather than a grid, the action is represented as Ri(X) where i is a number corresponding to a specific transaction.
  • W(X): The corresponding transaction "writes" to object X (i.e., it modifies the data stored at X). When the schedule is represented as a list rather than a grid, the action is represented as Wi(X) where i is a number corresponding to a specific transaction.
  • Com.: This represents a "commit" operation in which the corresponding transaction has successfully completed its preceding actions, and has made all its changes permanent in the database.

Alternatively, a schedule can be represented with a directed acyclic graph (or DAG) in which there is an arc (i.e., directed edge) between each ordered pair of operations.

Example

The following is an example of a schedule:

In this example, the columns represent the different transactions in the schedule D. Schedule D consists of three transactions T1, T2, T3. First T1 Reads and Writes to object X, and then Commits. Then T2 Reads and Writes to object Y and Commits, and finally, T3 Reads and Writes to object Z and Commits.

The schedule D above can be represented as list in the following way:

D = R1(X) W1(X) Com1 R2(Y) W2(Y) Com2 R3(Z) W3(Z) Com3

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication