Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of the following best explains why B+ trees typically have smaller height than B-trees ?

  • A.B+ trees use hashing internally to compress keys
  • B.Internal nodes store only keys, allowing higher fan-out
  • C.Leaf nodes are stored sequentially on disk
  • D.B+ trees disallow duplicate keys

Answer: B

The reason is that internal nodes store only keys, allowing higher fan-out.

In a B-tree, every node holds keys together with their records or record pointers. In a B+ tree, the internal nodes hold only keys and child pointers, and all data lives in the leaves. A disk block of fixed size can therefore hold many more entries in a B+ tree internal node, so each node has more children, and a tree with a higher fan-out reaches the same number of keys in fewer levels.

B+ trees do not use hashing. Sequentially linked leaves speed up range scans but do not reduce height. Whether duplicates are allowed has no effect on the height.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.