Database Questions and Answers – Concurrency in Index Structures

This set of Database Question Bank focuses on “Concurrency in Index Structures”.

1. The method of access that uses key transformation is called as
a) Direct
b) Hash
c) Random
d) Sequential
View Answer

Answer: b
Explanation: Hash technique uses particular hash key value.

2. Why do we need concurrency control on B+ trees ?
a) To remove the unwanted data
b) To easily add the index elements
c) To maintain accuracy of index
d) All of the mentioned
View Answer

Answer: c
Explanation: Indices do not have to be treated like other database structures.

3. How many techniques are available to control concurrency on B+ trees?
a) One
b) Three
c) Four
d) None of the mentioned
View Answer

Answer: d
Explanation: Two techniques are present.
advertisement
advertisement

4. In crabbing protocol locking
a) Goes down the tree and back up
b) Goes up the tree and back down
c) Goes down the tree and releases
d) Goes up the tree and releases
View Answer

Answer: a
Explanation: It moves in a crab like manner.

5. The deadlock can be handled by
a) Removing the nodes that are deadlocked
b) Restarting the search after releasing the lock
c) Restarting the search without releasing the lock
d) Resuming the search
View Answer

Answer: b
Explanation: Crabbing protocol moves in a crab like manner.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. In crabbing protocol, the lock obtained on the root node is in _________ mode.
a) Shared
b) Exclusive
c) Read only
d) None of the mentioned
View Answer

Answer: a
Explanation: Crabbing protocol moves in a crab like manner down the index tree.

7. If needed to split a node or coalesce it with its siblings, or redistribute key values between siblings, the crabbing protocol locks the parent of the node in ____________ mode.
a) Shared
b) Exclusive
c) Read only
d) None of the mentioned
View Answer

Answer: b
Explanation: Crabbing protocol moves in a crab like manner down the index tree.
advertisement

8. In crabbing protocol to inset or delete a key value the leaf node has to be locked in ___________ mode.
a) Shared
b) Exclusive
c) Read only
d) None of the mentioned
View Answer

Answer: b
Explanation: Crabbing protocol moves in a crab like manner down the index tree.

9. B-link tree requires a pointer to its __________ sibling.
a) Upper
b) Lower
c) Right
d) Left
View Answer

Answer: c
Explanation: This pointer is required because a lookup that occurs while a node is being split may have to search not only that node but also that node’s right sibling.
advertisement

10. Instead of locking index leaf nodes in a two-phase manner, some index concurrency-control schemes use ___________ on individual key values, allowing other key values to be inserted or deleted from the same leaf.
a) B+ tree locking
b) Link level locking
c) Key-value locking
d) Next value locking
View Answer

Answer: c
Explanation: Key-value locking thus provides increased concurrency.

Sanfoundry Global Education & Learning Series – Database Management System.

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.