DatabasesLesson 1 of 1 in the course Transactions and concurrency

Database Transaction Isolation: Anomalies, Levels, and Concurrency Control

5 flashcards · 5 quiz questions · 5 match pairs · 4 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

Isolation is an ACID property that governs how concurrent transactions affect what one another can see. This lesson introduces isolation, the role of concurrency control, and ways isolation can be coordinated by a database or application middleware.

A database transaction is a unit of work. The ACID properties describe important guarantees for transactions: Atomicity, Consistency, Isolation, and Durability. Isolation concerns the visibility of one transaction’s work to other users and systems while transactions are executing concurrently.

All flashcards

What does isolation mean in the ACID model?
Isolation governs how the work of one transaction is visible to other users and systems while transactions execute concurrently.
What is concurrency control?
It is the collection of DBMS mechanisms that coordinates concurrent operations to preserve transaction correctness while allowing as much useful concurrency as possible.
What is serializability?
A concurrent schedule is serializable when its effect is equivalent to some serial execution of the same transactions.
Why can locks block a transaction?
A transaction may have to wait when it requests a lock incompatible with a lock another transaction already holds on the same database object.
What does a transaction manager do in a distributed application?
It coordinates transaction participants, such as servers, and can manage an atomic commit protocol while abstracting coordination details from the application.

Quiz questions

  1. What is a dirty read?Answer: Reading a change another transaction has not committed.
  2. Under the standard-described isolation levels, which statement about REPEATABLE READ is correct?Answer: It prevents dirty and non-repeatable reads but may allow phantoms.
  3. What does SERIALIZABLE require of a concurrent transaction schedule?Answer: Its effect must match some serial execution of the transactions.
  4. How can multiversion concurrency control preserve a transaction's snapshot while newer data is committed?Answer: It can detect a commit conflict and roll back a transaction with a serialization failure.
  5. What is a potential cost of using stronger isolation?Answer: Transactions may use more resources, block, or deadlock more often.

Based on the Wikipedia article Isolation (database systems), licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Databases lessons