Serializability Concept
A schedule S is serial if, for every transaction T participating in the schedule, all the operations of T is executed consecutively in the schedule. Interleaving does not occur in serial schedule. A schedule S of n transactions is serializable if it is equivalent to some of the serial schedule of the same n transactions. Two schedules are called result equivalent if they produce same final state of the database. A schedule is serializable if it is equivalent to a serial schedule. There are different forms of schedule equivalence that give rise to the notions of Conflict Serializability and View Serializability. Two actions Ai and Aj executed on the same data object by Ti and Tj conflicts if either one of them is a "write" operation. Let Ai and Aj be consecutive non-conflicting actions that belong to different transactions. We can swap Ai and Aj without changing the result. Two schedules are conflict equivalent if they can be turned into one another by a sequence of non-conflicting swaps of adjacent actions. If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions we can say that S and S’ are conflict equivalent. A schedule S is said to be conflict serializable if it is conflict equivalent to a serial schedule.
Summary
A schedule S is serial if, for every transaction T participating in the schedule, all the operations of T is executed consecutively in the schedule. Interleaving does not occur in serial schedule. A schedule S of n transactions is serializable if it is equivalent to some of the serial schedule of the same n transactions. Two schedules are called result equivalent if they produce same final state of the database. A schedule is serializable if it is equivalent to a serial schedule. There are different forms of schedule equivalence that give rise to the notions of Conflict Serializability and View Serializability. Two actions Ai and Aj executed on the same data object by Ti and Tj conflicts if either one of them is a "write" operation. Let Ai and Aj be consecutive non-conflicting actions that belong to different transactions. We can swap Ai and Aj without changing the result. Two schedules are conflict equivalent if they can be turned into one another by a sequence of non-conflicting swaps of adjacent actions. If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions we can say that S and S’ are conflict equivalent. A schedule S is said to be conflict serializable if it is conflict equivalent to a serial schedule.
Things to Remember
- A schedule S is serial if, for every transaction T participating in the schedule, all the operations of T is executed consecutively in the schedule.
- Interleaving does not occur in serial schedule. A schedule S of n transactions is serializable if it is equivalent to some of the serial schedule of the same n transactions.
- Two schedules are called result equivalent if they produce same final state of the database.
- A schedule is serializable if it is equivalent to a serial schedule. There are different forms of schedule equivalence that give rise to the notions of Conflict Serializability and View Serializability.
- Two schedules are conflict equivalent if they can be turned into one another by a sequence of non-conflicting swaps of adjacent actions.
- A schedule S is said to be conflict serializable if it is conflict equivalent to a serial schedule.
MCQs
No MCQs found.
Subjective Questions
No subjective questions found.
Videos
No videos found.

Serializability Concept
Serializability
A schedule S is serial if, for every transaction T participating in the schedule, all the operations of T is executed consecutively on the schedule. Interleaving does not occur in the serial schedule. A schedule S of n transactions is serializable if it is equivalent to some of the serial schedule of the same n transactions.
Two schedules are called result equivalent if they produce the same final state of the database. A schedule is serializable if it is equivalent to a serial schedule. Given below are different forms of schedule equivalence that give rise to the notions of:
- Conflict Serializability
- View Serializability
Conflict Serializability:
Two actions Ai and Aj executed on the same data object by Ti and Tj conflicts if either one of them is a write operation. Let Ai and Aj be consecutive non-conflicting actions that belong to different transactions. We can swap Ai and Aj without changing the result. Two schedules are conflict equivalent if they can be turned into one another by a sequence of non-conflicting swaps of adjacent actions. If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions we can say that S and S’ are conflict equivalent. A schedule S is said to be conflict serializable if it is conflict equivalent to a serial schedule. Actions Ii and Ij of transactions Ti and Tj respectively conflict if and only if there exists some item Q accessed by Ii as well as Ij and at least one of these instructions wrote Q.
- Ii = read (Q), Ij = read (Q). Ii and Ij don’t conflict.
- Ii = read (Q), Ij = write (Q). They conflict.
- Ii = write (Q), Ij = read (Q). They conflict.
- Ii = write (Q), Ij = write (Q). They conflict.
Intuitively, a conflict between Ii and Ij forces a logical or temporal order between them. That is, replacing their order will change the result. If Ii and Ij are consecutive on a schedule and they do not conflict their results would still be the same even if they have been interchanged in the schedule. For example Schedule 3 can be transformed into Schedule 4, a serial schedule where T2 follows by T1, by series of swaps of non-conflicting instructions. Therefore Schedule 3 is conflict serializable.
An example of a Schedule that does not conflict serializable. We are unable to swap instructions in the schedule given above to obtain either the serial schedule < T3, T4 > or the serial schedule <T4,T3>.
Test for Conflict Serializability of a Schedule
- For each transaction, Ti participating in schedule S create a node labeled Ti in the precedence graph.
- For each case in S where Tj executes a read_item(X) after Ti executes a write_item(X), create an edge (Ti→ Tj)
- For each case in S where Tj executes a write_item(X) after Ti executes a read_item(X), create an edge (Ti→ Tj)
- For each case in S where Tj executes a write_item(X) after Ti executes a write_item(X), create an edge (Ti→ Tj)
- The schedule S is serializable if and only if the precedence graph has no cycles.
Example
Assume we have these three transactions:
T1: r1(x); w1 (x);r1(y); w1(y)
T2: r2(z); r2(y); w2(y); r2(x); w2(x)
T3: r3 (y); r3 (z); w3 (y);w3(z)
Assume we have these schedules:
S1:r2(z); r2(y); w2(y); r3 (y); r3 (z); r1(x); w1 (x); w3 (y); w3(z); r2(x); r1(y); w1(y); w2(x)
No equivalent serial schedule
(Cycle x (T1→ T2), y (T2→T1))
(Cycle x (T1→ T2), yz (T2→T3), y(T3→ T1))
Assume we have another schedule for the same transactions:
S2:r3 (y); r3 (z); r1(x); w1 (x); w3 (y); w3(z); r2(z); r1(y); w1(y); r2(y); w2(y); r2(x); w2(x)
Equivalent serial schedule
T3→ T1→ T2
View Serializability
A schedule S is said to be view serializable if it is view equivalent to a serial schedule. Every conflict serializable schedule is also viewed serializable. Schedules S1 and S2 are view equivalent if:
- If Ti reads initial value of A in S1 then Ti also reads initial value of A in S2.
- If Ti reads a value of A written by Tj in S1 then Ti also reads the value of A written by Tj in S2.
- If Tiwrites final value of A in S1, then Ti also writes the final value of A in S2.
Example:
- Consider the following schedule of three transactions
T1: r1 (X), w1(X); T2: w2(X); and T3: w3(X);
Schedule S: r1 (X); w2(X); w1(X); w3(X); c1; c2; c3; - In S, the operations w2(X) and w3(X) are blind writes, since T1 and T3 do not read the value of X.
- S is view serializable since it is view equivalent to the serial schedule T1, T2, T3.
- However, S is not conflicted serializable since it does not conflict equivalent to any serial serializable.
References:
- H.F.Korth and A. Silberschatz,"Database system concepts",McGraw Hill,2010
- A.K.Majumdar and p, Bhatt acharya,"Database Management Systems",Tata McGraw Hill,India,2004
- F.Korth, Henry. Database System Concepts. 6th edition.
Lesson
Transactions processing and Concurrency Control
Subject
Computer Engineering
Grade
Engineering
Recent Notes
No recent notes.
Related Notes
No related notes.