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

Discussion

A B+ -tree index is to be built on the Name attribute of the relation STUDENT. Assume that all student names are of length 8 bytes, disk block are size 512 bytes, and index pointers are of size 4 bytes. Given this scenario, what would be the best choice of the degree (i.e. the number of pointers per node) of the B+ -tree ?

  • A.16
  • B.42
  • C.43
  • D.44

Answer: C

The best degree is 43.

A node with n pointers holds n - 1 keys, and must fit in one 512-byte block:

\[ \begin{aligned} 4n + 8(n - 1) &\le 512 \\ 12n &\le 520 \\ n &\le 43.3 \end{aligned} \]

So n = 43. With 44 pointers the node would need \(4 \times 44 + 8 \times 43 = 520\) bytes, more than a block. 42 wastes space, and 16 does not follow from the sizes.

In a B+ tree the leaf and internal nodes may hold slightly different numbers of entries, but the question asks for the pointer count of a node that fits one block.

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

Post your comment

Please log in or register to post a comment.