chapter
    File Organization, Indexing and B+ Trees PYQs for GATE CS

    Solve 7+ File Organization, Indexing and B+ Trees previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    2026 Slot Set2 PYQ
    An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following two statements.

    S1: A hash index must be a dense index
    S2: A tree index can be a sparse index

    Which one of the following options is correct?
    Question 2
    2025 Slot Set2 PYQ
    In a - tree where each node can hold at most four key values, a root to leaf path consists of the following nodes:



    The *-marked keys signify that these are data entries in a leaf.

    Assume that a pointer between keys and points to a subtree containing keys in , and that when a leaf is created, the smallest key in it is copied up into its parent.

    A record with key value 23 is inserted into the - tree.

    The smallest key value in the parent of the leaf that contains is __________. (Answer in integer)
    Question 3
    2025 Slot Set1 PYQ
    Consider the following tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the tree. Which of the following options(s) is/are CORRECT?

    612191437910131517202122
    Question 4
    2024 Slot Set2 PYQ

    Which of the following file organizations is/are I/O efficient for the scan operation in DBMS?

    Question 5
    2024 Slot Set1 PYQ

    In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?

    Question 6
    2023 PYQ
    Consider a database of fixed-length records, stored as an ordered file. The database has 25,000 records, with each record being 100 bytes, of which the primary key occupies 15 bytes. The data file is block-aligned in that each data record is fully contained within a block. The database is indexed by a primary index file, which is also stored as a block-aligned ordered file. The figure below depicts this indexing scheme.

    Index FileBlock AnchorPrimary KeyBlockPointerData FilePrimary Key(15 Bytes)Other Fields(85 Bytes)⋮⋮⋮⋮⋮⋮

    Suppose the block size of the file system is 1024 bytes, and a pointer to a block occupies 5 bytes. The system uses binary search on the index file to search for a record with a given key. You may assume that a binary search on an index file of blocks takes block accesses in the worst case.
    Given a key, the number of block accesses required to identify the block in the data file that may contain a record with the key, in the worst case, is __________.
    Question 7
    2021 Slot Set2 PYQ

    A data file consisting of 1,50,000 student-records is stored on a hard disk with block size of 4096 bytes. The data file is sorted on the primary key RollNo. The size of a record pointer for this disk is 7 bytes. Each student-record has a candidate key attribute called ANum of size 12 bytes. Suppose an index file with records consisting of two fields, ANum value and the record pointer to the corresponding student record, is built and stored on the same disk. Assume that the records of data file and index file are not split across disk blocks. The number of blocks in the index file is __________.

    Free preview ends here

    Login to view the complete previous-year questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    File Organization, Indexing and B+ Trees PYQs for GATE CS

    Solve 7+ File Organization, Indexing and B+ Trees previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    B+ Tree Insertion, Splitting and Occupancy

    Databases › File Organization, Indexing and B+ Trees

    B+ Tree Mechanics

    Mastering insertion, splitting, and balance.

    What you will learn here
    1
    The step-by-step algorithm for inserting keys into leaf and internal nodes.
    2
    How node splitting works and how the middle key propagates upward.
    3
    Occupancy constraints: why nodes must be at least half full.

    B+ Tree Structure and Order

    B+ Tree Structure and Order

    1. The Order ()

    Defines node capacity. A node has at most child pointers and keys. Note: Verify if the problem specifies "max keys" or "max pointers".

    2. Balanced Property

    All leaf nodes are at the same depth. This guarantees consistent search time for any key.

    3. Leaf vs Internal Nodes

    Internal Nodes: Contain keys and child pointers. Act as an index.

    Leaf Nodes: Contain keys and data pointers. Linked for range queries.

    Key Insight: Because internal nodes do not store data pointers, they can hold more keys per block, reducing the tree height.

    File Organization, Indexing and B+ Trees: Solved Questions with Step-by-Step Explanations (7 Problems)

    Question 1 · Databases · 2026_Set2 MCQ
    An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following two statements.

    S1: A hash index must be a dense index
    S2: A tree index can be a sparse index

    Which one of the following options is correct?
    1. A.

      Both S1 and S2 are true

    2. B.

      Both S1 and S2 are false

    3. C.

      S1 is true and S2 is false

    4. D.

      S1 is false and S2 is true

    Question 2 · Databases · 2025_Set2 NAT
    In a - tree where each node can hold at most four key values, a root to leaf path consists of the following nodes:



    The *-marked keys signify that these are data entries in a leaf.

    Assume that a pointer between keys and points to a subtree containing keys in , and that when a leaf is created, the smallest key in it is copied up into its parent.

    A record with key value 23 is inserted into the - tree.

    The smallest key value in the parent of the leaf that contains is __________. (Answer in integer)
    Question 3 · Databases · 2025_Set1 MSQ
    Consider the following tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the tree. Which of the following options(s) is/are CORRECT?

    612191437910131517202122
    1. A.

      None of the nodes will split.

    2. B.

      At least one node will split and redistribute.

    3. C.

      The total number of nodes will remain same.

    4. D.

      The height of the tree will increase.

    Question 4 · Databases · 2024_Set2 MSQ

    Which of the following file organizations is/are I/O efficient for the scan operation in DBMS?

    1. A.

      Sorted

    2. B.

      Heap

    3. C.

      Unclustered tree index

    4. D.

      Unclustered hash index

    Question 5 · Databases · 2024_Set1 MCQ

    In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?

    1. A.

      Only the root node

    2. B.

      All leaf nodes

    3. C.

      All internal nodes

    4. D.

      Only the leftmost leaf node

    Question 6 · Databases · 2023 NAT
    Consider a database of fixed-length records, stored as an ordered file. The database has 25,000 records, with each record being 100 bytes, of which the primary key occupies 15 bytes. The data file is block-aligned in that each data record is fully contained within a block. The database is indexed by a primary index file, which is also stored as a block-aligned ordered file. The figure below depicts this indexing scheme.

    Index FileBlock AnchorPrimary KeyBlockPointerData FilePrimary Key(15 Bytes)Other Fields(85 Bytes)⋮⋮⋮⋮⋮⋮

    Suppose the block size of the file system is 1024 bytes, and a pointer to a block occupies 5 bytes. The system uses binary search on the index file to search for a record with a given key. You may assume that a binary search on an index file of blocks takes block accesses in the worst case.
    Given a key, the number of block accesses required to identify the block in the data file that may contain a record with the key, in the worst case, is __________.
    Question 7 · Databases · 2021_Set2 NAT

    A data file consisting of 1,50,000 student-records is stored on a hard disk with block size of 4096 bytes. The data file is sorted on the primary key RollNo. The size of a record pointer for this disk is 7 bytes. Each student-record has a candidate key attribute called ANum of size 12 bytes. Suppose an index file with records consisting of two fields, ANum value and the record pointer to the corresponding student record, is built and stored on the same disk. Assume that the records of data file and index file are not split across disk blocks. The number of blocks in the index file is __________.

    More previous year questions (pyqs) in this unit