国际空间研究组织 | ISRO CS 2013 |问题 26
根据下面给出的信息计算B+树的叶子(p叶子)和非叶子(p)节点的顺序
搜索关键字字段 = 12 个字节
记录指针 = 10 字节
块指针 = 8 个字节
块大小 = 1 KB
(A) p叶= 51 & p = 46
(B) p叶= 47 & p = 52
(C) p叶= 46 & p = 50
(D) p叶= 52 & p = 47答案: (C)
说明:在B+树中,卫星信息(记录信息)只存储在叶子节点中,而非叶子节点中,因此不需要在非叶子节点中包含记录指针。
i) leaf node:
let the order of leaf be 'n'
size of search key field * n + record pointer * n + block pointer <= 1024
12 * n + 10 * n + 8 <= 1024
22n <= 1016
n = 46
ii) for non-leaf node:
size of search key field * n + block pointer * (n+1) <= 1024
12 * n + 8 * n + 8 = 1024
n = 50.8
order of non-leaf node (p) = 50
选项(C)是正确的。这个问题的测验