Transaction Processing Concepts Chapter 19 Outline Introduction to











- Slides: 11
Transaction Processing Concepts Chapter 19
Outline Introduction to transaction processing Transaction and system concepts Desirable properties of transations
Introduction Transaction: logical unit of database processing that includes one or more access operations Transaction (set of operation) – Stand alone specified by high level language SQL – May be embedded within a program Read-only transaction: transaction only reads data from database Boundaries: begin and End
Single User and Multiuser DBMS is a single user if ar most one user at a time can use it DBMS is multi-user if many user can use the system concurrently CPU can execute one process at cretin time Concurrent execution of processes is actually interleaved Concurrency control on DBMS is developed in term of interleaved concurrency
Figure 19. 2 Two sample transactions. (a) Transaction T 1. (b) Transaction T 2.
Concurrency Control Several problem can occur when concurrent transactions execute Lost of update problem Temporary update ( Dirty Read) problem The incorrect summary problem
Transaction Recovery DBMS responsible for transaction to – Making sure that all the operation in the transaction are completed successfully for making and their effect is recorded permanently in the database – The transaction has no effect whatsoever on the database or on any other transactions.
Transaction Recovery (Cont. ) BDMS should not permit some operations of a transaction to be applied to the database while other operations are not due to transaction failure
Type of failures Computer failure Transaction or system error Local error or exception conditions detected Concurrency control enforcement Disk failure Physical problem and catastrophes
Transaction and System Concept Transaction : atomic unit of work Transaction States – Active – Partially committed – Committed – Failed – Terminated
Figure 19. 4 State transition diagram illustrating the states for transaction execution.