Unit-4 Transactions
Unit-4 Transactions
Transactions
● Transaction Concept
● Transaction State
● Concurrent Executions
● Serializability
● Recoverability
● Concurrency Control
Transaction Concept
● A transaction is a collection of operations that
perform a single unit of work.
● A transaction is a unit of program execution that
accesses and possibly updates various data items.
● E.g. transaction to transfer Rs 100 from account A to
account B:
● Two main issues to deal with:
● Failures of various kinds, such as hardware failures
and system crashes
● Concurrent execution of multiple transactions
Example of Fund Transfer
● Transaction to transfer Rs100 from account A to account B:
1. read(A)
2. A := A – 100
3. write(A)
4. read(B)
5. B := B + 100
6. write(B)
Schedule 3 Schedule 6
Conflict Serializability
● Example of a schedule that is not conflict serializable: