This set of RDBMS Multiple Choice Questions & Answers (MCQs) focuses on “Insert, Delete Operations and Predicate Reads”.
1. ________ deletes a data item from a database
a) Delete(Q)
b) Insert(Q)
c) Drop(Q)
d) None of the mentioned
View Answer
Explanation: Delete(Q) deletes a data item from a database. Insert(Q) inserts a new data item Q into the database and assign Q an initial value.
2. Which of the following does not lock the entire index
a) Phantom locking
b) Phantom problem
c) Index locking
d) Index problem
View Answer
Explanation: Index locking avoids locking the entire index. Any transaction that inserts a tuple into a relation must insert information into every index maintained on the relation.
3. Which of the following is included in the operational mechanism of the index locking protocol?
a) Every transaction must have at least one index
b) A transaction that performs a lookup must acquire a shared lock on all the index leaf nodes that it accesses
c) The rule of the two phase locking mechanism must be observed
d) All of the mentioned
View Answer
Explanation: The operational mechanism of the index locking protocol includes, every transaction must have at least one index. A transaction that performs lookup must acquire a shared lock on all the index leaf nodes that it accesses. The rule of the two phase locking mechanism must be followed.
4. _________ is a form of two degree consistency designed for programs that iterate over tuples of a relation by using cursors.
a) Cursor stability
b) Serializability
c) Non-serializability
d) Predicate locking
View Answer
Explanation: Cursor stability is a form of two degree consistency designed for programs that iterate over tuples of a relation by using cursors. It ensures that the tuple that is currently being processed is locked in shared mode and any modified tuples are locked in exclusive mode until the transaction commits.
5. Transactions that involve user interactions are called __________
a) Validations
b) Conversations
c) Interfaces
d) None of the mentioned
View Answer
Explanation: Transactions that involve user interactions are called as conversation. These are named differently to differentiate them from regular transactions. Validation using version numbers is very useful for such transactions.
6. State true or false: Key value locking provides increased concurrency
a) True
b) False
View Answer
Explanation: Key value locking provides increased concurrency. Using key value improperly however might cause phantom phenomenon to occur.
7. To prevent the phantom phenomenon, _______ is used
a) Key value locking
b) Next key locking
c) Previous key locking
d) None of the mentioned
View Answer
Explanation: The failure of a system to prevent a non serialized tuple when two transactions conflict with each other is called as phantom phenomenon. To prevent the phantom phenomenon, the next key locking is used.
8. Which of the following does cursor stability ensure
a) The tuple that is currently being processed by the iteration is locked in shared mode
b) The tuple that is currently being processed is not locked in shared mode
c) Any modified tuples are not locked in exclusive mode
d) None of the mentioned
View Answer
Explanation: Cursor stability ensures that the tuple that is currently being processed by the iteration is locked in shared mode and any modified tuples are locked in exclusive mode until the transaction commits.
9. State true or false: Exclusive locks are held until transaction commit in degree two consistency
a) True
b) False
View Answer
Explanation: Exclusive locks are held until transaction commit in degree two consistency, no transaction can read an uncommitted value.
Sanfoundry Global Education & Learning Series – RDBMS.
To practice all areas of RDBMS, here is complete set of 1000+ Multiple Choice Questions and Answers.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Practice Computer Science MCQs
- Apply for Computer Science Internship
- Check RDBMS Books
- Check Computer Science Books