View worked solution
Answer: 4
To find the minimum number of disk accesses required to retrieve any record, we need to minimize the height of the tree by assuming all nodes are filled to their maximum capacity.
1. Calculate the order of non-leaf nodes ():
A non-leaf node of order contains at most pointers and keys. Given:
- Block size () =
- Key size () =
- Pointer size () =
Thus, the maximum order of a non-leaf node is .
2. Calculate the maximum capacity of leaf nodes ():
A leaf node contains record pointers, keys, and one next-leaf pointer:
Thus, the maximum number of records indexed per leaf node is .
3. Determine the minimum height of the tree:
The database has records.
- Number of leaf nodes: nodes
- Level 2 (parents of leaves): nodes
- Level 3 (Root): node
The minimum height of the tree is levels.
4. Total Disk Accesses:
To retrieve a record, we must access:
- disk blocks to traverse the tree (Root Intermediate Leaf).
- disk block to fetch the actual data record.
Total disk accesses = .
Free practice · Your answers on this page are not saved.
