Questions: Serialization and Conflict Prevention Techniques

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A database guarantees SERIALIZABLE isolation. Which statement correctly describes what this means?

AAll transactions must complete entirely before the next one is allowed to start
BTransactions may execute concurrently, but the results must be equivalent to some serial ordering of those transactions
CTransactions are sorted by start timestamp and executed in that order
DOnly one transaction can hold a write lock at a time, serializing all writes
Question 2 Multiple Choice

Two transactions T1 and T2 run concurrently at SERIALIZABLE isolation under MVCC. T1 reads account balances; T2 updates one. At commit time, the system detects a conflict and aborts T2. A developer says: 'MVCC is broken — we paid for SERIALIZABLE isolation but our transaction was aborted.' What is the correct response?

AThe developer is correct; SERIALIZABLE isolation should prevent all transaction aborts
BThe abort IS how MVCC enforces serializability — allowing T2 to commit would produce a non-serializable result, so the system aborts and retries rather than committing invalid data
CMVCC cannot provide SERIALIZABLE isolation; the developer should switch to 2PL to avoid aborts
DT2 should have been allowed to commit because it only wrote data, not read the conflicting rows
Question 3 True / False

Two read-only transactions can always execute in parallel without violating SERIALIZABLE isolation, regardless of the isolation mechanism.

TTrue
FFalse
Question 4 True / False

Two-phase locking (2PL) prevents conflicts by requiring transactions to release their existing locks before acquiring new ones.

TTrue
FFalse
Question 5 Short Answer

What is the fundamental difference in how 2PL and MVCC achieve serializability, and what does this mean for concurrent read-only transactions?

Think about your answer, then reveal below.