Concurrency control techniques (locking, timestamping, multiversion) MCQs in DBMS

By: Prof. Dr. Fazal Rehman Shamil | Last updated: September 23, 2024

  1. Which concurrency control technique uses locks to manage access to database resources?
    a) Timestamping
    b) Multiversioning
    c) Locking
    d) SerializationAnswer: c) Locking
  2. In a locking-based concurrency control system, what happens when two transactions request conflicting locks?
    a) One transaction is granted the lock, and the other is delayed or denied.
    b) Both transactions are granted the locks, and a conflict is resolved later.
    c) Both transactions are automatically rolled back.
    d) The system crashes and restarts.Answer: a) One transaction is granted the lock, and the other is delayed or denied.
  3. What type of lock allows both read and write operations but blocks other transactions from acquiring any lock on the same data item?
    a) Shared Lock
    b) Exclusive Lock
    c) Intent Lock
    d) Update LockAnswer: b) Exclusive Lock
  4. In timestamp-based concurrency control, what determines the order in which transactions are executed?
    a) The time at which the transaction was initiated
    b) The number of operations performed by the transaction
    c) The type of locks held by the transaction
    d) The priority assigned to the transactionAnswer: a) The time at which the transaction was initiated
  5. Which concurrency control technique maintains multiple versions of a data item to ensure consistency and manage concurrent access?
    a) Locking
    b) Timestamping
    c) Multiversioning
    d) Deadlock PreventionAnswer: c) Multiversioning
  6. In the context of locking, what is a deadlock?
    a) A situation where two or more transactions wait indefinitely for resources held by each other.
    b) A scenario where transactions are rolled back due to system failure.
    c) A state where all transactions are granted access to resources.
    d) A condition where transactions are executed in a serializable manner.Answer: a) A situation where two or more transactions wait indefinitely for resources held by each other.
  7. In timestamp-based concurrency control, what is the role of the read_timestamp and write_timestamp for each transaction?
    a) To manage the execution order of transactions based on their timestamps.
    b) To determine the frequency of read and write operations by each transaction.
    c) To track the changes made by transactions for rollback purposes.
    d) To record the time at which a transaction starts and ends.Answer: a) To manage the execution order of transactions based on their timestamps.
  8. Which of the following is a common strategy for deadlock prevention in a locking-based system?
    a) Timestamp ordering
    b) Two-phase locking
    c) Multiversion concurrency control
    d) Wait-Die and Wound-Wait schemesAnswer: d) Wait-Die and Wound-Wait schemes
  9. In multiversion concurrency control, what is a “snapshot” in the context of transaction management?
    a) A real-time view of the database at a specific point in time.
    b) A record of all transactions executed in the system.
    c) A copy of the database schema.
    d) A backup of the database.Answer: a) A real-time view of the database at a specific point in time.
  10. Which locking protocol ensures that transactions are executed in a serializable order by acquiring a lock on data items?
    a) Strict Two-Phase Locking (2PL)
    b) Timestamp Ordering
    c) Optimistic Concurrency Control
    d) Multiversion Concurrency ControlAnswer: a) Strict Two-Phase Locking (2PL)
  11. What is the primary advantage of using multiversion concurrency control (MVCC) over traditional locking techniques?
    a) Reduced need for locking mechanisms and better handling of concurrent read and write operations.
    b) Simplified implementation of transaction logs.
    c) Lower storage requirements for maintaining multiple versions.
    d) Better prevention of deadlocks through simpler conflict resolution.Answer: a) Reduced need for locking mechanisms and better handling of concurrent read and write operations.
  12. In a timestamp-based concurrency control system, what action is taken if a transaction’s write operation conflicts with an already committed transaction’s read operation?
    a) The conflicting transaction is aborted.
    b) The database system automatically resolves the conflict by merging data.
    c) The conflicting transaction is delayed until the read operation completes.
    d) The read operation is rolled back.Answer: a) The conflicting transaction is aborted.
  13. What type of lock is typically used to prevent other transactions from reading or writing to a data item that is being updated?
    a) Shared Lock
    b) Exclusive Lock
    c) Intent Lock
    d) Read LockAnswer: b) Exclusive Lock
  14. Which concurrency control technique might require a database system to maintain a history of all versions of data items?
    a) Locking
    b) Timestamping
    c) Multiversioning
    d) Two-Phase LockingAnswer: c) Multiversioning
  15. What is a major drawback of using timestamp-based concurrency control?
    a) High overhead due to the management of timestamps and rollback of transactions.
    b) Increased complexity in handling deadlocks.
    c) Inefficient handling of read operations compared to locking.
    d) Difficulty in managing concurrent updates without locking.Answer: a) High overhead due to the management of timestamps and rollback of transactions.

 

More MCQs Of Database Systems

  1. Database Models MCQs in DBMS
    1. Hierarchical model MCQs in DBMS
    2. Network model MCQs in DBMS
    3. Relational model MCQs in DBMS
    4. Object-oriented model MCQs in DBMS
    5. NoSQL databases MCQs in DBMS
  2. Relational Database Model MCQs in DBMS
    1. tables, attributes, tuples, and relations MCQs in DBMS
    2. Primary keys and foreign keys MCQs in DBMS
    3. Integrity constraints MCQs in DBMS
  3. SQL (Structured Query Language) MCQs in DBMS
    1. Data Definition Language (DDL) MCQs in DBMS
    2. Data Manipulation Language (DML) MCQs in DBMS
    3. Data Control Language (DCL) MCQs in DBMS
    4. Transaction Control Language (TCL) MCQs in DBMS
    5. Advanced SQL queries and functions MCQs in DBMS
  4. Database Design MCQs in DBMS
    1. Entity-Relationship (ER) modeling MCQs in DBMS
    2. Extended ER modeling MCQs in DBMS
    3. Normalization and normal forms (1NF, 2NF, 3NF, BCNF) MCQs in DBMS
    4. Denormalization MCQs in DBMS
  5. Database Management System Architecture MCQs in DBMS
    1. Three-schema architecture (external, conceptual, internal) MCQs in DBMS
    2. Data independence MCQs in DBMS
    3. DBMS components and functions MCQs in DBMS
  6. Storage and File Structure MCQs in DBMS
    1. Data storage on physical media MCQs in DBMS
    2. File organization and access methods MCQs
    3. Indexing (B-trees, hash indexing) MCQs in DBMS
    4. RAID technology MCQs in DBMS
  7. Query Processing and Optimization MCQs in DBMS
  8. Database Transaction Management MCQs in DBMS
    1. ACID properties (Atomicity, Consistency, Isolation, Durability) MCQs in DBMS
    2. Transaction states and lifecycle MCQs in DBMS
    3. Concurrency control techniques (locking, timestamping, multiversion) MCQs in DBMS
    4. Deadlock detection and resolution MCQs in DBMS
  9. Database Security and Authorization MCQs in DBMS
    1. Authentication and authorization mechanisms MCQs in DBMS
    2. Data encryption techniques MCQs in DBMS
    3. Role-based access control MCQs in DBMS
    4. SQL injection prevention MCQs in DBMS
  10. Backup and Recovery MCQs in DBMS
    1. Backup types and strategies MCQs in DBMS
    2. Recovery techniques (log-based, shadow paging) MCQs in DBMS
    3. Disaster recovery planning MCQs in DBMS
  11. Distributed Databases MCQs in DBMS
    1. Distributed database architecture MCQs MCQs in DBMS
    2. Data fragmentation, replication, and allocation in DBMS
    3. Distributed query processing MCQs in DBMS
    4. Consistency models and protocols MCQs in DBMS
  1. SET 1: database design mcqs (database design mcqs )
  2. SET 2: database mcqs with answers pdf (database mcqs with answers pdf )
  3. SET 3: modern database management 12th edition mcqs (modern database management 12th edition mcqs)
  4. SET 4: database systems mcqs (database systems mcqs)
  5. SET 5: dbms mcqs (dbms mcqs )
  6. SET 6: dbms mcqs with answers (dbms mcqs with answers)
  7. SET 7: solved mcqs of dbms (solved mcqs of dbms)
  8. SET 8: dbms mcqs with answers pdf(dbms mcqs with answers pdf)
  9. SET 9: relational database management system mcqs(relational database management system mcqs)
  10. SET 10: solved mcqs of database management system(solved mcqs of database management system)
  11. SET 11: basic database mcqs pdf (basic database mcqs pdf)
  12. SET 12: relational database management system mcqs (relational database management system mcqs )
  13. SET 13: database mcqs online test (database mcqs online test)
  14. SET 14: database interview questions mcqs (database interview questions mcqs)
  15. SET 15: database developer mcqs (database developer mcqs)
  16. SET 16: database Repeated mcqs (database Repeated mcqs)
  17. SET 17: Database mcqs PPSC (Database mcqs PPSC)
  18. SET 18: Database mcqs FPSC (Database mcqs FPSC)
  19. SET 19: DBMS mcqs FPSC (DBMS mcqs FPSC)

New Arrival

Database interview questions