edited by
2,865 views
1 votes
1 votes
When would you want to use a B-tree instead of B+ Tree?

1. When sequential access to key values is never required.

2. When sequential access to key values is required.

3. When both Direct and sequential access is required.

4. When Direct access is required without sequential access.
edited by

2 Answers

5 votes
5 votes
Option no 4 is correct

The major draw back of B-Tree is the difficulty of Traversing the keys sequentially. The B+ Tree retains the rapid random access property of the B-Tree while also allowing rapid sequential access.  So When Direct Access is needed without sequential access B-Tree is preferred.

The primary distinction between B-tree and B+tree is that B-tree eliminates the redundant storage of search key values.Since search keys are not repeated in the B-tree,we may not be able to store the index using fewer tree nodes than in corresponding B+tree index.However,since search key that appear in non-leaf nodes appear nowhere else in B-tree,we are forced to include an additional pointer field for each search key in a non-leaf node. Their are space advantages for B-tree, as repetition does not occur and can be used for large indices.

ref: Data Structures Using C// Author: Aaro M Tenenbaum

@Arjun Sir, please correct if I am wrong

Thanks in Advance
0 votes
0 votes

answer is 2, because in B Trees we have to sequentially search the keys. In B+ tree data is ordered in sequential linked list and the data is stored in leaf nodes but in B tree the leaf nodes cannot  be stored in linked list due to lack of the sibling pointers, hence use B Trees when only sequential access is required.

Related questions

1 votes
1 votes
2 answers
1
chaser asked Dec 2, 2016
753 views
1 votes
1 votes
1 answer
3
Na462 asked Jun 29, 2018
626 views
Please Solve this question. I didn't understood the question properly so please Make Me as well :) What is meant by Leaf Page ?