Indexing formulas
File organisation and indexing. 14 formulas for GATE DA Database Management and Warehousing, each with when to use it. Each is explained in the topic notes.
IAE Academy: File organisation and indexing formulas (GATE DA)
All 14 Indexing formulas
BLOCKING FACTOR (UNSPANNED)
Records per block. The floor is essential: with unspanned records the leftover bytes in each block are unused.
NUMBER OF DATA BLOCKS
Blocks needed for records; round up because a partly filled last block still occupies a block.
BINARY SEARCH ON A SORTED FILE
Applies only to the field the file is sorted on, and counts block accesses, not record comparisons. This is the usual convention in problems; the strict worst case of binary search is , which is one more only when is a power of 2. Follow the convention the question states.
INDEX BLOCKING FACTOR (FAN-OUT)
Entries per index block, where an entry is a key plus a block pointer (replace by if the entries hold record pointers).
SINGLE-LEVEL INDEX SIZE
Dense: one entry per record. Sparse primary index: one entry per data block. A clustering index on a field with distinct values needs blocks.
SEARCH WITH A SINGLE-LEVEL INDEX
Binary search over the index blocks (same convention as for a sorted file), plus one access to fetch the data block. A non-key secondary index with a level of indirection adds one more access for the block of record pointers.
MULTILEVEL INDEX LEVELS AND COST
is the fan-out, the number of first-level entries and the number of first-level blocks. The first form is valid for (for , ); the second for .
B+ TREE INTERNAL NODE ORDER
Largest satisfying this; internal nodes hold block pointers and keys.
B+ TREE LEAF CAPACITY
Largest number of keys in a leaf, where the extra is the next-leaf pointer.
B-TREE NODE ORDER
Each key in a B-tree node carries a record pointer, so one node type serves internal nodes and leaves.
KEYS STORED IN A B+ TREE OF HEIGHT H
Max: every node full, so leaves of keys. Min: the root has 2 children and every other internal node , giving leaves, each with keys.
KEYS STORED IN A B-TREE OF HEIGHT H
Max: all nodes full with keys each. Min: the root has 1 key (2 children) and every other node keys.
BLOCK ACCESSES FOR AN EQUALITY SEARCH
One block per level down to the leaf, plus one to read the data record. Leaves holding the record itself need only .
EXTENDIBLE HASHING DIRECTORY
is the global depth and a bucket's local depth.
Where this was asked: 2024 (1), 2026 (2). See the 3 previous-year questions on Indexing. This shows what was asked, not what will be asked.