简体   繁体   English

B +树插入-理论问题

[英]B+ Tree Insertion - Theoretical Question

I have been trying to know how B+ Tree works and been trying to solve the examples. 我一直在尝试了解B + Tree的工作原理,并试图解决这些示例。

In one such document listed here , in the Example 1 given on page 8. It describes a B+ tree construction, where 'n' number of search key values per node - is given as 4. 此处列出的一个此类文档中,在第8页上给出的示例1中。它描述了B +树的构造,其中每个节点的n个搜索关键字值-给出为4。

Everything goes according to the rules till the third step, but suddenly in the 4th step you see the root node being split, and other splits coming up. 一切都按照规则进行,直到第三步为止,但突然在第四步中,您会看到根节点被拆分,并且其他拆分即将进行。 I understood why the node 17,19,21 is split(this is apparently not shown in the text). 我理解了为什么节点17,19,21被拆分(这显然没有在文本中显示)。 But I'm surprised why the root is split up. 但是我很惊讶为什么根被分裂了。 Can anyone clarify this to me or suggest a better example which is quite complicated but with a more distinctive and step-by-step approach. 任何人都可以向我澄清这一点,还是可以提出一个更好的例子,这个例子很复杂,但却采用了更加独特和循序渐进的方法。

This is how B-Trees work: Leaf nodes are filled and on overflow they Split, sending 1 keyvalue up. B树的工作方式如下:叶子节点被填充,溢出时它们分裂,向上发送1个键值。 The node above could then also split, all the way up to the root. 然后,上面的节点也可能一直分裂到根。

The example is a little weak, normally all nodes except the root are at least half-full. 该示例有些虚弱,通常除根节点外的所有节点都至少为一半。 But half of 3 is 1, so this is not too obvious. 但是3的一半是1,所以这不太明显。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM