Skip to content
Official PYQ · 2017

GATE CS 2017 Set 2 Q49 — File Organization and Indexing (B and B+ Trees)

Explain with AI
In a B+B^+ Tree , if the search-key value is 88 bytes long , the block size is 512512 bytes and the pointer size is 2  B2\;\text{B} , then the maximum order of the B+B^+ Tree is ____
View worked solution

Answer: 52

In a B+B^+ tree, the order (pp) is defined as the maximum number of pointers an internal node can contain. An internal node with order pp contains at most pp block pointers and p−1p-1 search keys.

To fit within a single disk block, the total size of these pointers and keys must not exceed the block size (BB):

Size of p pointers+Size of (p−1) keys≤Block size\text{Size of } p \text{ pointers} + \text{Size of } (p - 1) \text{ keys} \le \text{Block size}

Given:

  • Block size (BB) = 512512 bytes
  • Search-key size (VV) = 88 bytes
  • Pointer size (PP) = 22 bytes

Substituting these values into the inequality:

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

p⋅2+(p−1)⋅8≤512p \cdot 2 + (p - 1) \cdot 8 \le 512

2p+8p−8≤5122p + 8p - 8 \le 512

10p≤52010p \le 520

p≤52p \le 52

Thus, the maximum order of the B+B^+ tree is 52.

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