File System · Databases
24 questions · asked in 16 of 27 years (2000–2026)
MCQ 17 · MSQ 2 · NAT 51-mark 18 · 2-mark 6
2000Questions per year2026
Questions 21–24 of 24
The order of an internal node in a B+ tree index is the maximum number of children it can have. Suppose that a child pointer takes 6 bytes, the search field value takes 14 bytes, and the block size is 512 bytes. What is the order of the internal node?
Answer: (C)
An internal node of order p has p child pointers (6 bytes each) and p-1 search values (14 bytes each). It must fit in a 512-byte block:
The largest whole value is .
Answer: (C)
The largest whole value is .
Answer: (C)
A B+-tree index is to be built on the Name attribute of the relation STUDENT. Assume that all student names are of length 8 bytes, disk blocks are of size 512 bytes, and index pointers are of size 4 bytes. Given this scenario, what would be the best choice of the degree (i.e. the number of pointers per node) of the B+-tree
Answer: (C)
The degree p is the number of pointers per node, and a node must fit in a 512-byte block. Key = 8 bytes, pointer = 4 bytes.
Internal node (p child pointers and p-1 keys):
Leaf node (p-1 keys, p-1 record pointers and one sibling pointer):
Both node types give the same limit. The largest whole value is . Degree 44 does not fit in a block, and 16 and 42 waste space.
Answer: (C)
Internal node (p child pointers and p-1 keys):
Leaf node (p-1 keys, p-1 record pointers and one sibling pointer):
Both node types give the same limit. The largest whole value is . Degree 44 does not fit in a block, and 16 and 42 waste space.
Answer: (C)
In the index allocation scheme of blocks to a file, the maximum possible size of the file depends on
Answer: (C)
With index allocation, we can work out the maximum file size like this:
Blocks one Index block can address Size of block / Size of block address
Block addresses available to address one file
Most blocks we can use for the Index * Blocks one Index block can address
Size of File = * Size of Block
So it is clear that:
The answer is (C).
A & B are not complete.
-trees are preferred to binary trees in databases because
Answer: (B)
Reading from disk takes a seek and rotation, which is far slower than reading memory. So the cost of an index search is the number of disk accesses. A B+ tree node fills one disk block and has a high fanout, so the tree is very shallow and a search needs only a few disk accesses. A binary tree is much deeper and needs many more. This is useful because disk access is much slower than memory access, so (B) is the reason.
(A) Disk capacity does not change how a search is done. (C) The cost of one access is mostly seek and rotation delay, not the transfer rate, and the B+ tree helps by cutting the number of accesses. (D) Reliability has no bearing on the tree shape.
Answer: (B)
(A) Disk capacity does not change how a search is done. (C) The cost of one access is mostly seek and rotation delay, not the transfer rate, and the B+ tree helps by cutting the number of accesses. (D) Reliability has no bearing on the tree shape.
Answer: (B)
Keep practising