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) = ______.
(57, 53)
An internal node with K child pointers holds K−1 keys, so \(8K+10(K-1)\le1024\) and \(K=\left\lfloor\frac{1034}{18}\right\rfloor=57\). A leaf holds L key–record-pointer pairs plus one next-leaf pointer: \(L(10+9)+8\le1024\), giving \(L=\left\lfloor\frac{1016}{19}\right\rfloor=53\). Therefore \((K,L)=(57,53)\).
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.
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?
In the traditional classification of ordered-file indexes as primary, clustering and secondary indexes, a clustering index is defined on a field that is: