Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.
Concurrency ControlEasy
Q1. Concurrency control ensures:
- A.Larger storage capacity on the disk drives
- B.Better network speed between client nodes
- C.Faster hardware performance for the system
- D.Correct execution of concurrent transactions✓ Correct
Explanation
Concurrency control manages simultaneous transaction execution to maintain data consistency.
Report an error in this question
Concurrency ControlEasy
Q2. A lock in database concurrency control is:
- A.A mechanism to control access to a data item✓ Correct
- B.A backup method for protecting against loss
- C.A type of query for retrieving stored data
- D.A type of index for speeding up data search
Explanation
A lock is a mechanism that restricts access to a data item during concurrent execution.
Report an error in this question
Concurrency ControlEasy
Q3. A shared lock allows:
- A.Writing by multiple transactions to the same data item
- B.No access at all to the locked data item by any party
- C.Only one transaction to read the data item at any time
- D.Multiple transactions to read the data item simultaneously✓ Correct
Explanation
A shared (read) lock allows multiple transactions to read the data item concurrently.
Report an error in this question
Concurrency ControlEasy
Q4. An exclusive lock allows:
- A.Multiple transactions to write to the same data item
- B.Multiple transactions to read from the same data item
- C.Only one transaction to read and write the data item✓ Correct
- D.No operations at all on the locked data item by anyone
Explanation
An exclusive (write) lock gives sole access to the data item for reading and writing.
Report an error in this question
Concurrency ControlEasy
Q5. A deadlock in database systems occurs when:
- A.All transactions commit at the same time without any conflicts found
- B.A single transaction is very slow in completing its data operations
- C.Two or more transactions are waiting for each other to release locks✓ Correct
- D.No transactions are running in the database system at the moment
Explanation
A deadlock occurs when transactions form a cycle of lock dependencies, each waiting for another.
Report an error in this question
Concurrency ControlEasy
Q6. The Two-Phase Locking (2PL) protocol has two phases:
- A.Lock phase and Unlock phase only
- B.Growing phase and Shrinking phase✓ Correct
- C.Read phase and Write phase only
- D.Start phase and End phase only
Explanation
2PL has a growing phase (acquiring locks, no releases) and a shrinking phase (releasing locks, no acquisitions).
Report an error in this question
Concurrency ControlEasy
Q7. Which of the following can break a deadlock?
- A.Adding more locks to the waiting transactions
- B.Creating more indexes on the locked data items
- C.Aborting one of the deadlocked transactions✓ Correct
- D.Increasing the buffer size for the data manager
Explanation
Breaking a deadlock typically requires aborting (rolling back) one or more of the involved transactions.
Report an error in this question
Concurrency ControlEasy
Q8. Starvation in concurrency control occurs when:
- A.All transactions complete quickly without any delays or blocking
- B.A transaction waits indefinitely because others keep getting priority✓ Correct
- C.The database runs out of storage space on the physical disk
- D.No locks are used by any of the transactions in the database
Explanation
Starvation occurs when a transaction is repeatedly denied access to resources it needs.
Report an error in this question
Concurrency ControlEasy
Q9. A lock manager is responsible for:
- A.Designing schemas for new data models
- B.Creating tables in the database schema
- C.Writing SQL queries for data retrieval
- D.Granting and releasing locks on data items✓ Correct
Explanation
The lock manager handles lock requests, grants, and releases for concurrent transactions.
Report an error in this question
Concurrency ControlEasy
Q10. The lock compatibility matrix shows:
- A.How to create new tables in the database schema now
- B.Which lock types can coexist on the same data item✓ Correct
- C.The execution plans for all queries in the database
- D.Index structures for optimizing data retrieval speed
Explanation
The lock compatibility matrix indicates which lock modes are compatible with each other.
Report an error in this question
Concurrency ControlMedium
Q11. Strict Two-Phase Locking requires that:
- A.No locks are needed for any transaction under this locking protocol
- B.Only shared locks are used and exclusive locks are never acquired
- C.All exclusive locks are held until the transaction commits or aborts✓ Correct
- D.Locks can be released at any time during the transaction processing
Explanation
Strict 2PL holds all exclusive locks until transaction commit/abort to prevent cascading rollbacks.
Report an error in this question
Concurrency ControlMedium
Q12. Rigorous Two-Phase Locking requires:
- A.Locks are released immediately after each individual use
- B.All locks (shared and exclusive) are held until commit or abort✓ Correct
- C.Only exclusive locks are held until the transaction commits
- D.No growing phase exists in this locking protocol at all
Explanation
Rigorous 2PL holds all locks until commit/abort, ensuring strict serializability.
Report an error in this question
Concurrency ControlMedium
Q13. A wait-die deadlock prevention scheme:
- A.Allows younger transactions to wait; older ones are rolled back
- B.Allows older transactions to wait; younger ones are rolled back✓ Correct
- C.Prevents all waiting by immediately aborting every transaction
- D.Kills all transactions to resolve and prevent deadlock situations
Explanation
Wait-die: older transaction waits for younger; younger transaction requesting a lock held by older is rolled back.
Report an error in this question
Concurrency ControlMedium
Q14. A wound-wait deadlock prevention scheme:
- A.All transactions wait without any preemption at all now
- B.No preemption occurs under any circumstances in the system
- C.Older transactions preempt younger ones; younger ones wait✓ Correct
- D.Younger transactions preempt older ones; older ones wait
Explanation
Wound-wait: older transaction preempts (wounds) younger; younger requesting lock held by older must wait.
Report an error in this question
Concurrency ControlMedium
Q15. A deadlock detection algorithm uses:
- A.A hash table index
- B.A wait-for graph✓ Correct
- C.An ER diagram model
- D.A B-tree structure
Explanation
The wait-for graph tracks which transactions are waiting for which; a cycle indicates a deadlock.
Report an error in this question
Concurrency ControlMedium
Q16. Timestamp-based concurrency control assigns:
- A.Random access to data items without any order
- B.Locks to all data items accessed by transactions
- C.A unique timestamp to each transaction for ordering✓ Correct
- D.Priority based on the size of each transaction
Explanation
Timestamp ordering assigns each transaction a unique timestamp and uses it to determine serialization order.
Report an error in this question
Concurrency ControlMedium
Q17. In timestamp ordering, if a transaction tries to write a data item with a later read timestamp:
- A.The data item gets deleted
- B.The transaction is rolled back✓ Correct
- C.The read timestamp is updated
- D.The write proceeds normally
Explanation
If a transaction's timestamp is earlier than the data item's read timestamp, the write is rejected and the transaction rolls back.
Report an error in this question
Concurrency ControlMedium
Q18. Optimistic concurrency control assumes that:
- A.Conflicts are frequent and locks must always be acquired
- B.All transactions conflict and none can proceed at once
- C.No validation is needed at any point during processing
- D.Conflicts are rare, so validation is done at commit time✓ Correct
Explanation
Optimistic protocols assume conflicts are rare and validate transactions only when they try to commit.
Report an error in this question
Concurrency ControlMedium
Q19. The three phases of optimistic concurrency control are:
- A.Start, Process, End
- B.Read, Validation, Write✓ Correct
- C.Read, Write, Commit
- D.Lock, Execute, Unlock
Explanation
Optimistic control has Read (execute without locks), Validation (check for conflicts), and Write (apply changes).
Report an error in this question
Concurrency ControlMedium
Q20. Lock granularity refers to:
- A.The number of transactions in the system
- B.The type of query being currently executed
- C.The size of the data item that is locked✓ Correct
- D.The speed of acquiring locks on the item
Explanation
Lock granularity determines the size of the lockable unit: row, page, table, or database level.
Report an error in this question
Concurrency ControlHard
Q21. Multiple Granularity Locking uses intention locks. An Intention Shared (IS) lock means:
- A.No lower-level locks exist on any of the descendant nodes in the tree
- B.The item cannot be locked by any transaction under any circumstances
- C.A transaction intends to acquire shared locks on finer-granularity items✓ Correct
- D.A transaction has exclusively locked the entire item and all subitems
Explanation
IS lock indicates the transaction intends to set shared locks on descendant nodes in the lock hierarchy.
Report an error in this question
Concurrency ControlHard
Q22. An Intention Exclusive (IX) lock means:
- A.A transaction currently has a shared lock on the item and its subitems
- B.No locks are needed for any data items under this locking protocol
- C.A transaction intends to acquire exclusive locks on finer-granularity items✓ Correct
- D.The transaction is aborted because it cannot acquire the needed lock
Explanation
IX lock indicates the transaction intends to set exclusive locks on descendant (finer granularity) nodes.
Report an error in this question
Concurrency ControlHard
Q23. A Shared Intention Exclusive (SIX) lock means:
- A.No intention locks exist on any node in the hierarchy and all nodes are freely open
- B.The node is shared-locked and the transaction intends to exclusively lock finer items✓ Correct
- C.The node is exclusively locked by the transaction and no other can access it at all
- D.The transaction is complete and all locks have been released from every node here
Explanation
SIX combines a shared lock on the node with an intention to set exclusive locks on descendants.
Report an error in this question
Concurrency ControlHard
Q24. In the Thomas Write Rule (modification to timestamp ordering):
- A.Obsolete writes are ignored instead of causing rollback✓ Correct
- B.All writes cause rollback regardless of timestamp order
- C.Reads are ignored and only writes are processed by it
- D.Timestamps are not used in this modified protocol
Explanation
The Thomas Write Rule skips obsolete writes (where a newer write already exists) instead of rolling back the transaction.
Report an error in this question
Concurrency ControlHard
Q25. The phantom problem in locking can be solved by:
- A.Allowing dirty reads between queries
- B.Using only row-level locks in tables
- C.Index locking or predicate locking✓ Correct
- D.Removing all indexes from the tables
Explanation
Index locking or predicate locking prevents phantom tuples by locking the index range or predicate space.
Report an error in this question
Concurrency ControlHard
Q26. In multi-version timestamp ordering (MVTO):
- A.Only one version of each data item is maintained
- B.Reads always block writes until they are completed
- C.No timestamps are used for ordering transactions
- D.Each write creates a new version of the data item✓ Correct
Explanation
MVTO maintains multiple versions of data items; writes create new versions tagged with the transaction timestamp.
Report an error in this question
Concurrency ControlHard
Q27. The wound-wait scheme is a preemptive protocol because:
- A.Younger transactions always preempt older ones holding locks on data items
- B.No rollback ever occurs because all transactions complete without conflict
- C.An older transaction can force a younger one holding a needed lock to roll back✓ Correct
- D.Only reads are preempted while writes always proceed without interruption
Explanation
Wound-wait is preemptive because the older transaction 'wounds' (forces rollback of) the younger transaction holding the lock.
Report an error in this question
Concurrency ControlHard
Q28. In tree locking protocol (for B+ tree indexes), a transaction must:
- A.Use no locks at all when accessing data through the index structure
- B.Lock children before parents when traversing the index tree structure
- C.Lock a node before locking its children, and unlock parent before child✓ Correct
- D.Lock all nodes simultaneously before accessing any data in the tree
Explanation
The tree protocol requires locking parent nodes before children, following the tree structure top-down.
Report an error in this question
Concurrency ControlHard
Q29. Lock escalation is the process of:
- A.Converting coarse-grained locks into many more fine-grained locks
- B.Converting many fine-grained locks into fewer coarse-grained locks✓ Correct
- C.Adding locks continuously without ever releasing any of them
- D.Removing all locks from the data items in the locked collection
Explanation
Lock escalation converts multiple fine-grained locks (e.g., row locks) into a single coarse-grained lock (e.g., table lock) to reduce overhead.
Report an error in this question
Concurrency ControlHard
Q30. Snapshot isolation provides each transaction with:
- A.Only read access to the data without any ability to write modifications
- B.No isolation at all between concurrently executing database transactions
- C.Access to the latest uncommitted data written by other active transactions
- D.A consistent snapshot of the database as of the transaction's start time✓ Correct
Explanation
Snapshot isolation gives each transaction a consistent view of the database from its start time.
Report an error in this question