This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Lock-Based Protocols”.
1. In order to maintain transactional integrity and database consistency, what technology does a DBMS deploy?
a) Triggers
b) Pointers
c) Locks
d) Cursors
View Answer
Explanation: Locks are used to maintain database consistency.
2. A lock that allows concurrent transactions to access different rows of the same table is known as a
a) Database-level lock
b) Table-level lock
c) Page-level lock
d) Row-level lock
View Answer
Explanation: Locks are used to maintain database consistency.
3. Which of the following are introduced to reduce the overheads caused by the log-based recovery?
a) Checkpoints
b) Indices
c) Deadlocks
d) Locks
View Answer
Explanation: Checkpoints are introduced to reduce overheads caused by the log-based recovery.
4. Which of the following protocols ensures conflict serializability and safety from deadlocks?
a) Two-phase locking protocol
b) Time-stamp ordering protocol
c) Graph based protocol
d) None of the mentioned
View Answer
Explanation: Time-stamp ordering protocol ensures conflict serializability and safety from deadlocks.
5. Which of the following is the block that is not permitted to be written back to the disk?
a) Dead code
b) Read only
c) Pinned
d) Zapped
View Answer
Explanation: A block that is not permitted to be written back to the disk is called pinned.
6. If transaction Ti gets an explicit lock on the file Fc in exclusive mode, then it has an __________ on all the records belonging to that file.
a) Explicit lock in exclusive mode
b) Implicit lock in shared mode
c) Explicit lock in shared mode
d) Implicit lock in exclusive mode
View Answer
Explanation: If transaction Ti gets an explicit lock on the file Fc in exclusive mode, then it has an implicit lock in exclusive mode on all the records belonging to that file.
7. Which refers to a property of computer to run several operation simultaneously and possible as computers await response of each other
a) Concurrency
b) Deadlock
c) Backup
d) Recovery
View Answer
Explanation: Concurrency is a property of systems in which several computations are executing simultaneously, and potentially interacting with each other.
8. All lock information is managed by a __________ which is responsible for assigning and policing the locks used by the transactions.
a) Scheduler
b) DBMS
c) Lock manager
d) Locking agent
View Answer
Explanation: A distributed lock manager (DLM) provides distributed software applications with a means to synchronize their accesses to shared resources.
9. The ____ lock allows concurrent transactions to access the same row as long as they require the use of different fields within that row.
a) Table-level
b) Page-level
c) Row-level
d) Field-level
View Answer
Explanation: Lock is limited to the attributes of the relation.
10. Which of the following is a procedure for acquiring the necessary locks for a transaction where all necessary locks are acquired before any are released?
a) Record controller
b) Exclusive lock
c) Authorization rule
d) Two phase lock
View Answer
Explanation: Two-phase lock is a procedure for acquiring the necessary locks for a transaction where all necessary locks are acquired before any are released.
Sanfoundry Global Education & Learning Series – Database Management System.
- Apply for Information Technology Internship
- Check Computer Science Books
- Apply for DBMS Internship
- Apply for Computer Science Internship
- Check Programming Books