Skip to main content

Database Management System MCQs with Answers

Practice important Database Management System MCQs with answers and explanations.

Chapter: 44
Q701:
What is the main concern of concurrency control (CC) in a database system?
A. Maintaining consistency during concurrent access
B. Reducing transaction execution time
C. Increasing the number of transactions
D. Improving hardware performance
Correct Answer: A
Chapter: 44
Q702:
Which problem is illustrated by transactions where one operates on many records while another modifies some of them, affecting the result of the first?
A. Uncommitted Update Problem
B. Inconsistent Analysis
C. Deadlock
D. Serializability Problem
Correct Answer: B
Chapter: 44
Q703:
In a serial schedule, how are transactions executed?
A. One after another, in a sequential order
B. Simultaneously, with interleaved operations
C. Based on their priority level
D. According to user input order
Correct Answer: A
Chapter: 44
Q704:
Which type of schedule is preferred for efficient execution but may generate concurrency problems if not controlled properly?
A. Serial Schedule
B. Interleaved Schedule
C. Static Schedule
D. Batch Schedule
Correct Answer: B
Chapter: 44
Q705:
In which situation does serializability ensure the consistency of the database?
A. When transactions are executed in a serial order
B. When transactions are executed in an interleaved manner
C. When conflicting operations are in a serial order
D. When non-conflicting operations are interleaved
Correct Answer: C
Chapter: 44
Q706:
What is the purpose of locking in concurrency control?
A. To ensure that only one transaction can perform an operation on an object at a time
B. To increase the speed of transaction processing
C. To allow multiple transactions to read the same object simultaneously
D. To reduce the number of transactions in the system
Correct Answer: A
Chapter: 44
Q707:
Which type of lock allows multiple transactions to read an object at the same time?
A. Read lock
B. Write lock
C. Exclusive lock
D. Shared lock
Correct Answer: A
Chapter: 44
Q708:
If a transaction holds a write lock on an object, which type of lock request will not be granted?
A. Read lock
B. Write lock
C. Shared lock
D. None of the above
Correct Answer: B
Chapter: 44
Q709:
What problem is addressed by serializability in concurrent transactions?
A. Conflicting operations are handled to ensure consistency
B. Non-conflicting operations are interleaved
C. Transaction execution time is minimized
D. Database hardware is optimized
Correct Answer: A
Chapter: 44
Q710:
What happens when a transaction with a write lock on an object is active, and another transaction requests a read lock on the same object?
A. The read lock is granted
B. The write lock is downgraded to a read lock
C. The read lock request is denied
D. The read lock request is ignored
Correct Answer: C
Chapter: 44
Q711:
What are the two types of locks mentioned in concurrency control?
A. Read lock and Write lock
B. Exclusive lock and Shared lock
C. Temporary lock and Permanent lock
D. Basic lock and Advanced lock
Correct Answer: A
Chapter: 44
Q712:
Fill in the blank: A _______ schedule has operations of different transactions interleaved with each other, which provides more efficient execution.
A. serial
B. parallel
C. interleaved
D. concurrent
Correct Answer: C
Chapter: 45
Q713:
Which of the following best describes optimistic locking?
A. The system locks data until the transaction completes
B. The system locks data temporarily during the transaction
C. The system does not lock data and checks for changes later
D. The system immediately releases all locks
Correct Answer: A
Chapter: 45
Q714:
What is the main goal of locking in database systems?
A. To ensure transactions are isolated from each other
B. To prevent transactions from accessing data
C. To optimize query execution speed
D. To increase system performance
Correct Answer: B
Chapter: 45
Q715:
In which phase does a transaction only release locks in the Two Phase Locking approach?
A. Growing phase
B. Shrinking phase
C. Acquiring phase
D. Committing phase
Correct Answer: B
Chapter: 45
Q716:
What occurs during a deadlock in a database system?
A. Transactions complete successfully without any issues
B. Transactions are blocked indefinitely, waiting for each other to release locks
C. Transactions are rolled back and restarted automatically
D. Transactions are ignored until manual intervention is performed
Correct Answer: B
Chapter: 45
Q717:
What is the purpose of the wait-for graph in deadlock handling?
A. It detects the current status of transactions
B. It identifies the resources currently being used
C. It helps to visualize and detect deadlocks
D. It prevents deadlocks from occurring
Correct Answer: A
Chapter: 45
Q718:
The timestamping method in database systems is used to:
A. Prevent all transactions from seeing uncommitted changes
B. Ensure transactions are executed in a specific order without locks
C. Lock data to prevent other transactions from accessing it
D. Force all transactions to complete before others can start
Correct Answer: B
Chapter: 45
Q719:
Which type of lock ensures that no other transaction can access the locked data?
A. Shared lock
B. Update lock
C. Exclusive lock
D. Temporary lock
Correct Answer: C
Chapter: 45
Q720:
Fill in the blank: A transaction with an isolation level of __________ does not result in any locks on the data read by the transaction.
A. read committed
B. read uncommitted
C. repeatable read
D. serializable
Correct Answer: B

Test Your Knowledge

Take a timed quiz on Database Management System

🚀 Start Quiz Now