In a B-Tree, each node represents a disk block. Suppose one block holds 8192…

2019

In a B-Tree, each node represents a disk block. Suppose one block holds 8192 bytes. Each key uses 32 bytes. In a B-tree of order 𝑀 there are 𝑀−1 keys. Since each branch is on another disk block, we assume a branch is of 4 bytes. The total memory requirement for a non-leaf node is

  1. A.

    32𝑀−32

  2. B.

    36𝑀–32

  3. C.

    36𝑀–36

  4. D.

    32𝑀–36

Attempted by 95 students.

Show answer & explanation

Correct answer: B

Solution: derive the total memory used by a non-leaf node.

  • A non-leaf node contains M − 1 keys and M branch pointers.

  • Memory for keys = 32 × (M − 1) = 32M − 32 bytes.

  • Memory for branch pointers = 4 × M = 4M bytes.

  • Total memory = (32M − 32) + 4M = 36M − 32 bytes.

Therefore, the correct expression for the total memory requirement of a non-leaf node is 36M − 32.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Tpsc Assistant Technical Officer