Q11
Q11
Transaction-1 Transaction-2
R(a)
W(a)
R(b)
W(b)
R(b)
W(b)
R(a)
W(a)
3. Here, we can see that Transaction-2 starts its execution after the
completion of Transaction-1.
4. Non-serial Schedule - A schedule in which the transactions are
interleaving or interchanging. There are several transactions
executing simultaneously as they are being used in performing real-
world database operations. These transactions may be working on
the same piece of data. Hence, the serializability of non-serial
schedules is a major concern so that our database is consistent
before and after the execution of the transactions.
5. Example:
Transaction-1 Transaction-2
R(a)
W(a)
R(b)
W(b)
R(b)
R(a)
W(b)
W(a)
Testing of Serializability
Two operations inside a schedule are called conflicting if they meet these
three conditions:
To conclude, let’s take two operations on data: "a". The conflicting pairs
are:
1. READ(a) - WRITE(a)
2. WRITE(a) - WRITE(a)
3. WRITE(a) - READ(a)
Let's take an example of schedule "S" having three transactions t1, t2,
and t3 working simultaneously, to get a better understanding.
t1 t2 t3
R(x)
R(z)
W(z)
R(y)
R(y)
W(y)
W(x)
W(z)
t1 t2 t3
W(x)