Transaction Management and Concurrency Control - ACID properties, serializability, lock-based concurrency control (2PL, deadlocks), time-stamping methods, optimistic methods - Question Bank
1. In timestamp ordering, if a transaction T attempts to write a data item X, and T's timestamp is less than RTS(X), what is the outcome?
2. What is the primary disadvantage of using Strict 2PL compared to basic 2PL?
3. Which lock mode prevents any other transaction from reading or writing the data item?
4. The concept of 'serializability' is crucial for ensuring:
5. Which isolation level allows dirty reads?
6. What is a 'dirty read' phenomenon?
7. Which of the following is a key consideration when choosing a concurrency control method?
8. What is the purpose of a 'commit record' in transaction logging?
9. In write-ahead logging, before modifying a data item on disk, the change must first be written to:
10. What is a 'write-ahead logging' (WAL) technique primarily used for?
11. Which method is used to detect if a transaction has been waiting for a lock for an excessively long time, potentially indicating a deadlock?
12. Starvation in concurrency control refers to:
13. Which of the following is a common technique to prevent deadlocks by breaking cycles in the wait-for graph?
14. What is the strongest isolation level, guaranteeing that concurrent transactions produce the same result as some serial execution?
15. Which isolation level ensures that if a transaction reads a data item, subsequent reads of the same data item within that transaction will return the same value?
16. What is the weakest isolation level, allowing transactions to read uncommitted data from other transactions?
17. Which isolation level guarantees that a transaction will see only committed data?
18. Which isolation level would prevent phantom reads?
19. What problem does the 'phantom read' phenomenon refer to?
20. In MVCC, when a transaction reads a data item, which version does it typically access?
21. Which type of concurrency control method creates multiple versions of data items?
22. What is a potential drawback of optimistic concurrency control?
23. If a transaction fails validation in an optimistic concurrency control system, what typically happens?
24. During the validation phase of optimistic concurrency control, what is checked?
25. Optimistic concurrency control methods typically involve three phases:
26. What is the core idea behind optimistic concurrency control methods?
27. What is the main advantage of time-stamping methods over basic 2PL?
28. If a transaction T tries to write a data item X, and T's timestamp is less than RTS(X), what action is typically taken?
29. If a transaction T tries to read a data item X, and T's timestamp is less than WTS(X), what action is typically taken?
30. In time-stamping methods, what is the 'write timestamp' (WTS) of a data item?
31. In time-stamping methods, what is the 'read timestamp' (RTS) of a data item?
32. Which timestamp-based concurrency control method assigns a unique timestamp to each transaction?
33. A cycle in the wait-for graph indicates:
34. What is the 'wait-for graph' used for in deadlock detection?
35. Which of the following is a common strategy for handling deadlocks?
36. What is a deadlock in the context of concurrency control?
37. In Strict Two-Phase Locking (Strict 2PL), when are all locks released by a transaction?
38. What is the primary purpose of Two-Phase Locking (2PL)?
39. Which of the following lock modes are compatible with each other? (S-lock with S-lock, S-lock with X-lock, X-lock with X-lock)
40. What type of lock is acquired when a transaction wants to modify a data item?
41. In lock-based concurrency control, what type of lock is acquired when a transaction wants to read a data item?
42. Two transactions T1 and T2 are in conflict if they access the same data item and at least one of the accesses is a write operation.
43. Which type of serializability guarantees that the result is equivalent to *some* serial order of execution?
44. What is the primary goal of serializability in transaction management?
45. Which ACID property ensures that concurrent transactions do not interfere with each other's execution?
46. If a transaction fails after committing some of its operations, which ACID property guarantees that the changes are permanent?
47. The Consistency property of ACID ensures that a transaction brings the database from one valid state to another.
48. Which ACID property ensures that a transaction is treated as a single, indivisible unit of work?
49. What does the 'A' in ACID properties stand for?