Chapter 20
Chapter 20
Chapter 20
CHAPTER 20
Introduction to Transaction Processi
Concepts and Theory
Dr. Najma Ismat
nismat@ssuet.edu.pk
◼ Multiuser DBMS
◼ Many users can access the system (database)
concurrently
◼ Example: airline reservations system
◼ Multiprogramming
◼ Allows the operating system to execute multiple processes
concurrently
◼ Executes commands from one process, then suspends that process
and executes commands from another process, etc.
◼ Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 20- 3
Introduction to Transaction
Processing (cont’d.)
◼ Interleaved processing
◼ When multiple transactions are being processed simultaneously,
their operations can become interleaved, meaning that the
operations of one transaction can be interspersed with the
operations of another.
◼ Parallel processing
◼ Processes C and D in figure below
◼ Read-only transaction
◼ If the database operations in a transaction do not
◼ Data item
◼ Record Granularity of
◼ Disk block data
◼ Attribute value of a record
◼ Process includes finding the address of the disk block, and copying
named X
◼ Process includes finding the address of the disk block, copying to
and from a memory buffer, and storing the updated disk block back
to disk
Example 2: Assume a banking system where with one transaction doing a transfer
of funds from account X to account Y and the other transaction doing a deposit to
account X
Figure 20.3
Some problems that occur when concurrent execution is uncontrolled.
(a) The lost update problem.
◼ Aborted transaction
◼ Does not affect the database
◼ Disk failure
commit point
completed
◼ The DBMIN method
◼ Predetermines the pattern of page references for each algorithm
higher-level transactions
◼ Dirty read occurs when a transaction reads the data that has been
updated by another transaction that is still uncommitted.
◼ Level 1 isolation has no lost updates
◼ Level 2 isolation has no lost updates and no dirty reads
◼ Level 3 (true) isolation has repeatable reads
◼ In addition to level 2 properties
◼ Snapshot isolation