Transaction Management
Transaction Management
It is a schedule of transactions where each transaction is committed before terminating. The example is shown below where transactions T1 and T2 terminates after committing the transactions.
Example:
T1 T2
A=1000
Read(A)
A=A+100
Write(A) Read(A)
B=A-100
Write(B)
Commit
Read(B)
Write(B)
Serializability
R(a)
W(a)
R(b)
W(b)
R(b)
W(b)
R(a)
W(a)
Non-serial Schedule -
R(a)
W(a)
R(b)
W(b)
R(b)
R(a)
W(b)
W(a)
Anomalies due to interleave execution of transaction:
Reading the same object twice before committing the transaction might
yield an inconsistency