Introduction to Transaction Processing
Introduction to Transaction
Example: Bank balance transfer of $100 dollars from a checking account to a saving account in a BANK database
Introduction to Transaction Cont:-
Introduction to Transaction Cont:-
For transaction processing purposes, a simple database model is used:
Transaction Notation
Transaction Example
a) read(x): Performs the reading operation of data item x from the database.
b) write(x): Performs the writing operation of data item x to the database.
T1: read(X); Y:=Y+50;
X:= X-50; write(Y);
write(X);
read(Y);
Transaction Concept issues
Required Properties of a Transaction
1.read(A)
2.A := A – 50
3.write(A)
4.read(B)
5.B := B + 50
6.write(B)
Required Properties of a Transaction (Cont.)
Required Properties of a Transaction (Cont.)
1. read(A)
2. A := A – 50
3. write(A)� read(A), read(B), print(A+B)
4. read(B)
5. B := B + 50
6. write(B
ACID Properties
Transaction States
Transaction States
A transaction is an atomic unit of work that is either completed in its entirety or not done at all. A transaction passes through several states.
Transaction states: