Skip to content
Official PYQ · 2002

GATE CS 2002 Q2.23 — File Organization and Indexing (B and B+ Trees)

Explain with AI

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

Choose one option
View worked solution

Answer: C

To find the best choice of the degree (number of pointers per node, pp) of the B+B^+-tree, we need to ensure that the total size of an internal node does not exceed the disk block size.

Let:

  • Disk block size (BB) = 512512 bytes
  • Key size (KK) = 88 bytes (length of student name)
  • Pointer size (PP) = 44 bytes

An internal node of a B+B^+-tree with degree pp contains:

  • pp pointers
  • p−1p - 1 keys

The total size of the node must satisfy the following inequality:

p⋅P+(p−1)⋅K≤Bp \cdot P + (p - 1) \cdot K \le B

Substituting the given values into the inequality:

p⋅4+(p−1)⋅8≤512p \cdot 4 + (p - 1) \cdot 8 \le 512 4p+8p−8≤5124p + 8p - 8 \le 512 12p≤52012p \le 520 p≤52012≈43.33p \le \frac{520}{12} \approx 43.33

Since the degree pp must be an integer, the maximum possible value is:

p=43p = 43

Therefore, the best choice for the degree of the B+B^+-tree is 43.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore File Organization and Indexing (B and B+ Trees) questions