Unit 4 Transaction Processing
Unit 4 Transaction Processing
Unit 4 Transaction Processing
-Ashu Mehta
Database Systems
Transaction Processing Systems
• Transaction Processing Systems are the
systems with large databases and hundreds of
concurrent users executing database
transactions.
• For example airline reservations, banking,
stock markets, etc.
Transaction
• A transaction is an executing program that
forms a logical unit of database processing.
• A transaction includes one or more database
access operations- these can include insertion,
deletion, modification, or retrieval operations.
• Transaction is executed as a single unit. It is a
program unit whose execution may or may
not change the contents of a database.
Example
• A transfer of money from one bank account to
another requires two changes to the database
both must succeed or fail together.
– Subtracting the money from the savings account
balance.
– Adding the money to the checking account
balance.
Example
Processes of Transaction
• Read Operation: To read a database object, it
is first brought into main memory from disk
and then its value is copied into a program
variable.
A
Read (2) 5000
A
Write (1) 5000 to 7000
Schedule 2:
T1 T2 T3
W(A)
R(A)
W(A)
Schedule 4:
T1 T2
R(A)
W(A)
W(A)