RDBMS Questions and Answers – Insert, Delete Operations and Predicate Reads

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

Answer: a
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

Answer: c
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

Answer: d
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.
advertisement
advertisement

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

Answer: a
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

Answer: b
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

Answer: a
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

Answer: b
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.
advertisement

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

Answer: a
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

Answer: a
Explanation: Exclusive locks are held until transaction commit in degree two consistency, no transaction can read an uncommitted value.
advertisement

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]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.