The order of a leaf node in a B+ tree is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is 1K bytes, data record pointer is 7 bytes long, the value field is 9 bytes long and a block pointer is 6 bytes long, what is the order of the leaf node?
63
A leaf holds \(p\) value-record-pointer pairs plus one pointer to the next leaf. Taking 1K as 1024 bytes, \(p(9+7)+6\le1024\). Therefore \(p\le\frac{1018}{16}=63.625\), so the maximum integer capacity is 63 pairs.
Suppose you have a Linux file system where the block size is 2K bytes, a disk address is 32 bits, and an i-node contains the disk addresses of the first 12 direct blocks of file, a single indirect block, and a double indirect block. Approximately, what is the largest file that can be represented by an i-node?
Use binary units: 1 Kbyte = 1024 bytes and 1 Mbyte = \(2^{20}\) bytes.
Suppose a B +tree is used for indexing a database file. Consider the following information :
size of the search key field = 10 bytes, block size = 1024 bytes, size of the record pointer = 9 bytes, size of the block pointer = 8 bytes.
Let K be the order of internal node and L be the order of leaf node of B +tree, then (K, L) = ______.
In the traditional classification of ordered-file indexes as primary, clustering and secondary indexes, a clustering index is defined on a field that is: