Questions: Isolation Level: REPEATABLE READ

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

Transaction A starts and reads all orders for customer 42, finding 3 rows. Transaction B then inserts a 4th order for customer 42 and commits. Transaction A re-runs the same SELECT query. Under REPEATABLE READ, what does Transaction A see?

A3 rows — REPEATABLE READ prevents all changes from other transactions from being visible
B4 rows — the newly inserted row can appear as a phantom read
CTransaction A is blocked until Transaction B commits before it can re-query
DAn error — REPEATABLE READ detects the conflict and aborts Transaction A
Question 2 Multiple Choice

REPEATABLE READ isolation prevents which of the following anomalies?

ADirty reads and phantom reads
BNon-repeatable reads and phantom reads
CDirty reads and non-repeatable reads
DOnly dirty reads
Question 3 True / False

Under REPEATABLE READ, if Transaction A reads a row, then Transaction B modifies and commits that row, Transaction A will see the updated value on its next read of that row.

TTrue
FFalse
Question 4 True / False

REPEATABLE READ is sufficient to prevent phantom reads in most SQL database systems.

TTrue
FFalse
Question 5 Short Answer

Explain the difference between a non-repeatable read and a phantom read, and why REPEATABLE READ prevents one but not the other.

Think about your answer, then reveal below.