in Databases recategorized by
331 views
2 votes
2 votes

Which of the following statements is/are true?

  1. B tree is faster for range search and B+ tree is faster for equality search.
  2. B tree is faster for equality search and B+ tree is faster for range search.
  3. Both B tree is and B+ tree are equally fast for equality and range search.
  4. Both B tree is and B+ tree are slow for equality and range search.
in Databases recategorized by
331 views

1 Answer

0 votes
0 votes
In a B tree, the key values are stored in the tree-structure itself. It is also called a dense index or clustered index. Whereas in a B+ tree, the tree index is used to direct the search and the key elements are stored in leaf nodes,
which are connected with pointers. Performing a range selection is faster in B+ tree, since if the first record that satisfies the range is located at the leaf level, then the rest of the records follow sequentially. On the other hand, for
equality search also, the search should proceed up to the leaf level. In B tree index, the search for equality search terminates as soon as the key value is found in the tree index itself, there is no need of going to the leaf level.
Performing a range selection is complicated in B tree, since the key values may be scattered all over the index structure.
Answer:

Related questions