in Databases
1,888 views
2 votes
2 votes
Which of the following statement is true for B tree and B+ tree index?

(a). B tree index is faster for range queries than B+ tree index.

(b). If disk block allocated for B+ tree index and the same size disk block is allocated for B tree index, then number of index blocks and I/O cost of B+ tree index is less than or equal to B tree index for given distinct keys.

(c). If disk block allocated for B+ tree index and the same size disk block is allocated for B tree index, then B tree index access cost is less than or equal to B+ tree for given distinct keys.

(d). If number of keys that can be stored in B tree and B+ tree index is same, then I/O cost of B+ tree index is less than or equal to I/O cost of B tree index for random access of same key from set of distinct keys.
in Databases
1.9k views

4 Comments

B Trees  see this and plzz tell difference

0
0

Should be D.

  • Because B+ trees don't have data associated with interior nodes, more keys can fit on a page of memory. Therefore, it will require fewer cache misses in order to access data that is on a leaf node.

As there will be fewer cache miss IO cost should be less. Number of index block required in B+ tree is more than B tree.

https://stackoverflow.com/questions/870218/differences-between-b-trees-and-b-trees

0
0

Because B trees contain data with each key, frequently accessed nodes can lie closer to the root, and therefore can be accessed more quickly.

@smsubham in option (d) the record that is accessed is the same record so access time of B tree should be faster.

0
0

Please log in or register to answer this question.