Skip to main content

Chapter 8 · Watch, then practise

Transaction and Concurrency Control

Separate atomic commitment across participants from isolation between concurrent transactions. Practice a serialization anomaly and explain why coordination protocols need recovery procedures.

3 questions · 3 with related videos. Matches are based on playlist titles; broader background matches are labeled.

What to study

  • Serializable execution
  • Concurrent transaction anomalies
  • Distributed commit

Chapter playlists

Choose a playlist

Notes

Lec-96: Introduction to Serializability | Transactions Concurrency and Control | DBMS

Gate Smashers · 9:17

Introduces serializability and transaction interleavings.

1. Serializability

Must serializable transactions execute physically one at a time?

No. They may overlap, but successfully committed results must correspond to some serial execution. A database can reject a conflicting transaction to preserve this property; an application must be prepared to retry the whole transaction.

Lec-87: Introduction to Transaction Concurrency in HINDI | Database Management System

Gate Smashers · 12:42 · Background lecture

Transaction-concurrency background; the doctors’ write-skew scenario is explained in the answer.

2. Write-skew example

Two doctors are on call. Each transaction sees the other on call and sets its own doctor off call. Why is the resulting state problematic?

Both can leave no doctor on call, although either transaction alone would preserve one. Separate row updates do not remove the shared predicate dependency. Serializable isolation or suitable explicit coordination must prevent both conflicting transactions from committing this result.

DS38: Distributed Transactions: Atomic Commit protocols| two phase commit in distributed database

University Academy · 9:30

Choose a video · 2 lectures

Two-phase commit lectures support the atomic-commit purpose and blocking discussion.

3. Commit versus consensus

What is the purpose of distributed transaction commit, and why can classic two-phase commit block?

Participants must agree whether the transaction commits or aborts. In two-phase commit, a participant that has prepared may have to wait if it cannot discover the coordinator’s decision. Fault-tolerant commit protocols add mechanisms to recover agreement; atomic commit and isolation solve different problems.

References