Transaction Management and Concurrency Control and Recovery in DBMS
Transaction Management and Concurrency Control and Recovery in DBMS
Atomicity
Requires that all operations (SQL requests) of
a transaction be completed; if not, then the
transaction is aborted
A transaction is treated as a single, indivisible,
logical unit of work
Durability
Indicates permanence of database’s consistent
state
When a transaction is complete, the database
reaches a consistent state. That state can not
be lost even if the system fails
Partially
committed committed
active
failed aborted
lost updates
uncommitted data
inconsistent retrievals
T1 and T2 can access the same database concurrently as long as they use different tables
Can cause bottlenecks when many transactions are trying to access the same table (even if the
transactions want to access different parts of the table and would not interfere with each other)
Not suitable for multi-user DBMSs
An entire disk page is locked (a table can span several pages and
each page can contain several rows of one or more tables)
Most frequently used multi-user DBMS locking method
Wound/wait
Older transaction rolls back the younger transaction
and reschedules it
Backup Levels:
Full Backup – save whole
database plus transaction log
Differential Backup (save
only pages that changed since last backup)
Transaction Log Backup
(save only the transaction log)