Purposes

  1. users need the ability to define a unit of work
  2. concurrent access to data by >1 user or program

Unit of work

Properties
• Atomicity
• Consistency
• Isolation
• Durability

Concurrent access

The Lost Update problem
Points of Transactions
The Uncommitted Data problem
Points of Transactions
Lock

  • lock manager
  • level of lock

Deadlock
– T1 locks data item X, then wants Y
– T2 locks data item Y, then wants X
– each waits to get a data item which the other transaction is
already holding
– could wait forever if not dealt with

相关文章: