The lecture slides of the data base management system have important concept material. The main points in slides are:Transaction Processing Concepts, Multi-User Systems, Write Operations, Problems in Concurrency Operations, Types of Transaction Failures, Serializability of Schedules, Granularity of Locking, Transaction Support
Download Transaction Processing Concepts - Data Base Management System - Lecture Slides and more Slides Database Management Systems (DBMS) in PDF only on Docsity!
Transaction Processing Concepts
Introduction to Transaction
Processing
Single-User Vs. Multi-User Systems
Read and Write Operations of a Transaction
Problems in Concurrency Operations
Types of Transaction Failures
Serializability of Schedules
Objectives
Function and importance of transactions.
Properties of transactions.
Concurrency Control
Meaning of serializability.
How locking can ensure serializability.
Deadlock and how it can be resolved.
How timestamping can ensure serializability.
Optimistic concurrency control.
Granularity of locking.
Recovery Control
Some causes of database failure.
Purpose of transaction log file.
Purpose of checkpointing.
How to recover following database failure.
Alternative models for long duration
transactions.
Transaction Support
A transaction is a sequence of one or more SQL operations treated as a unit ( another working definition).
SQL standard (and Oracle):
Transaction begins automatically when first SQL command is issued.
Transaction ends (and new one begins) when "COMMIT" command is issued or session ends.
Alternative "AUTO COMMIT" mode turns each statement into a transaction.
Example Transaction
Transaction Support
Can have one of two outcomes:
Success - transaction commits and database reaches a new consistent state.
Failure - transaction aborts , and database must be restored to consistent state before it started.
Such a transaction is rolled back or undone.
Committed transaction cannot be aborted.
Aborted transaction that is rolled back can
be restarted later.
State Transition Diagram for Transaction
Properties of Transactions
Consistency Must transform database from
one consistent state to another.
Implemented by database integrity constraints.
Properties of Transactions
Isolation Partial effects of incomplete transactions
should not be visible to other transactions.
Implemented by locking
Two transactions can be executed in perfect isolation if they run serially
However, running transactions strictly serially results in low throughput and poor response time
To improve efficiency, transactions can be interleaved. This is called concurrency.
The operations of one transaction can be freely interleaved with another so long as they do not conflict( operate on the same data)