GateAI
File Organization and Indexing

GATE CSE 2015 Set 2 · Q6

NAT1 markMedium

Time

With reference to the B+ tree index of order 1 shown below, the minimum number of nodes (including the Root node) that must be fetched in order to satisfy the following query: "Get all records with a search key greater than or equal to 7 and less than 15" is ______.

GATE CSE 2015 Set 2 Q6 diagram

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 5

File Organization and Indexing

To retrieve all records with a search key in the range [7,15)[7, 15):

  1. Fetch Root Node containing key [9]: Compare search key 77 with 99. Since 7<97 < 9, follow the left child pointer. (1st node fetched)

  2. Fetch Internal Node containing key [5]: Since 7≥57 \ge 5, follow the right child pointer. (2nd node fetched)

  3. Fetch Leaf Node containing [5, 7]: Key 77 is found in this leaf node. (3rd node fetched)

  4. Follow leaf-level right pointer to Leaf Node[9, 11]: Contains valid keys 99 and 1111 in the range. (4th node fetched)

  5. Follow leaf-level right pointer to Leaf Node[13, 15]: Contains valid key 1313. The key 1515 terminates the search range without needing to fetch the next leaf. (5th node fetched)

Thus, the total number of nodes fetched is 1+1+1+1+1=51 + 1 + 1 + 1 + 1 = 5.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This File Organization and Indexing previous year question is Q6 of the GATE CSE 2015 Set 2 paper. Find more GATE CSE PYQs on File Organization and Indexing in Databases, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related File Organization and Indexing PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

File Organization and Indexing in GATE CSE

File Organization and Indexing has 17 GATE CSE PYQs across 17 papers from 2011 to 2026. 2 of them are 1-mark NAT questions like this one, and it is the only one in GATE CSE 2015 Set 2.

How GATE tests File Organization and Indexing

More from GATE CSE 2015 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2015 Set 2 · Q6 · NAT

With reference to the B+ tree index of order 1 shown below, the minimum number of nodes (including the Root node) that must be fetched in order to satisfy the following query: "Get all records with a search key greater than or equal to 7 and less than 15" is …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.