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 ?
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.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development