Database Concurrency Control Quiz Form
Test your knowledge of database concurrency control concepts including locking, isolation levels, deadlocks, serializability, and more.
Which of the following is NOT a valid database isolation level?
*
Read Uncommitted
Read Committed
Repeatable Read
Write Committed
Which problems can occur under the Read Uncommitted isolation level? (Select all that apply)
*
Dirty Read
Lost Update
Deadlock
Phantom Read
A deadlock occurs when:
*
Two or more transactions wait indefinitely for each other to release locks
A transaction releases all its locks
Transactions are executed serially
A transaction is rolled back
Which locking protocol guarantees serializability but may lead to deadlocks?
*
Two-Phase Locking (2PL)
Timestamp Ordering
Optimistic Concurrency Control
None of the above
Which of the following best defines a 'lost update'?
*
An update made by one transaction is overwritten by another transaction
A transaction reads uncommitted data
A transaction is aborted due to a deadlock
A transaction reads the same row twice and gets different data
Match the concurrency problem to its description.
*
Rows
Dirty Read
Non-repeatable Read
Phantom Read
Lost Update
Select the correct description for each problem
A transaction reads data written by another transaction that is not yet committed
A transaction reads the same row twice and gets different data
A transaction reads a new row added by another transaction before commit
An update made by one transaction is overwritten by another
A transaction reads data written by another transaction that is not yet committed
A transaction reads the same row twice and gets different data
A transaction reads a new row added by another transaction before commit
An update made by one transaction is overwritten by another
A transaction reads data written by another transaction that is not yet committed
A transaction reads the same row twice and gets different data
A transaction reads a new row added by another transaction before commit
An update made by one transaction is overwritten by another
A transaction reads data written by another transaction that is not yet committed
A transaction reads the same row twice and gets different data
A transaction reads a new row added by another transaction before commit
An update made by one transaction is overwritten by another
How likely are you to encounter deadlocks if transactions always acquire all locks at once before execution begins?
*
1
2
3
4
5
Which actions can help recover from a deadlock? (Select all that apply)
*
Abort one or more transactions
Wait indefinitely
Use timeouts
Restart all transactions
Consider the following transaction schedule: T1: Read(A), Write(A), Read(B), Write(B) T2: Read(B), Write(B), Read(A), Write(A) Is this schedule conflict-serializable?
*
Yes
No
Cannot determine
Which of the following statements about optimistic concurrency control is TRUE?
*
It assumes conflicts are rare and checks for conflicts only at commit time
It uses locks throughout transaction execution
It is only used for read-only transactions
It always guarantees serializability
Submit Quiz
Should be Empty: