Professional Documents
Culture Documents
Conflict View Serializibilty
Conflict View Serializibilty
View Serializability
Serializable Schedule :
A transaction schedule is serializable if its outcome is equal to
the outcome of its transactions executed serially i.e.
sequentially without overlapping in time. A serializable schedule
always leaves the database in consistent state. A serial
schedule is always a serializable schedule because a new
transaction only starts when the older one has nished
execution.
Example –
Let us consider the following schedule and see if it is
serializable.
T1 T2
R(X)
R(X)
R(Y)
W(Y)
R(Y)
W(X)
fl
fi
Now, let us gure out if the above schedule is serializable.
T1 T2
R(X)
R(Y)
W(Y)
R(X)
R(Y)
W(X)
T1 T2 T3
R(X)
R(X)
W(Y)
W(X)
R(Y)
W(Y)
fl
fl
Now, we will list all the con icting operations. Further, we will
determine whether the schedule is con ict serializable
using Precedence Graph.
Two operations are said to be con icting if the belong to
different transaction, operate on same data and at least one of
them is a write operation.
1. R3(X) and W2(X) [ T3 -> T2 ]
2. W1(Y) and R3(Y) [ T1 -> T3 ]
3. W1(Y) and W2(Y) [ T1 -> T2 ]
4. R3(Y) and W2(Y) [ T3 -> T2 ]
Constructing the precedence graph, we see there are no cycles
in the graph. Therefore, the schedule is Con ict Serializable.
T1 T2 T3
R(A)
W(A)
R(A)
W(A)
W(A)