- Which concurrency control technique uses locks to manage access to database resources?
a) Timestamping
b) Multiversioning
c) Locking
d) SerializationAnswer: c) Locking - 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. - 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 - 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 - 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 - 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. - In timestamp-based concurrency control, what is the role of the
read_timestamp
andwrite_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. - 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 - 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. - 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) - 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. - 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. - 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 - 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 - 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
- Database Models MCQs in DBMS
- Relational Database Model MCQs in DBMS
- SQL (Structured Query Language) MCQs in DBMS
- Database Design MCQs in DBMS
- Database Management System Architecture MCQs in DBMS
- Storage and File Structure MCQs in DBMS
- Query Processing and Optimization MCQs in DBMS
- Database Transaction Management MCQs in DBMS
- Database Security and Authorization MCQs in DBMS
- Backup and Recovery MCQs in DBMS
- Distributed Databases MCQs in DBMS
- SET 1: database design mcqs (database design mcqs )
- SET 2: database mcqs with answers pdf (database mcqs with answers pdf )
- SET 3: modern database management 12th edition mcqs (modern database management 12th edition mcqs)
- SET 4: database systems mcqs (database systems mcqs)
- SET 5: dbms mcqs (dbms mcqs )
- SET 6: dbms mcqs with answers (dbms mcqs with answers)
- SET 7: solved mcqs of dbms (solved mcqs of dbms)
- SET 8: dbms mcqs with answers pdf(dbms mcqs with answers pdf)
- SET 9: relational database management system mcqs(relational database management system mcqs)
- SET 10: solved mcqs of database management system(solved mcqs of database management system)
- SET 11: basic database mcqs pdf (basic database mcqs pdf)
- SET 12: relational database management system mcqs (relational database management system mcqs )
- SET 13: database mcqs online test (database mcqs online test)
- SET 14: database interview questions mcqs (database interview questions mcqs)
- SET 15: database developer mcqs (database developer mcqs)
- SET 16: database Repeated mcqs (database Repeated mcqs)
- SET 17: Database mcqs PPSC (Database mcqs PPSC)
- SET 18: Database mcqs FPSC (Database mcqs FPSC)
- SET 19: DBMS mcqs FPSC (DBMS mcqs FPSC)
New Arrival