B树中的指针是什么?

What are Pointers in a B tree?

我很难理解 B 树中的 'pointer' 是什么。它们与二叉树的内部节点相同吗?

如果是,为什么名称不同?
如果不是,它们有什么不同?

读完这篇文章后我感到困惑(取自 wiki 的 B+ 树):

The primary value of a B+ tree is in storing data for efficient retrieval in a block-oriented storage context — in particular, filesystems. This is primarily because unlike binary search trees, B+ trees have very high fanout (number of pointers to child nodes in a node,1 typically on the order of 100 or more), which reduces the number of I/O operations required to find an element in the tree.

我在其他 SO 帖子中读到,B+ 树是 'pointers' 不保存数据,仅保存键的 B 树。那么,这个指针是什么?如果有人能解释为什么叶节点有如此多的 'pointers',那就太棒了:)

编辑:

经过评论区的讨论,事情开始变得清晰起来。但是,在这个 highly up-voted answer B树和B+树的区别中,发帖人贴了一张图片,图中粉红色的箭头是从内部节点出来的。它说 "pointers to data records" .. 但数据不是位于叶子中,所以为什么指针在这里?

wiki 条目讨论了二叉树和 btree 之间的区别。在一棵二叉树中,每个 parent 有 2 children:一个比另一个大,一个小。在 btree 中,每个 parent 可以有很多 children(这是维基百科文章中的 high fanout)以及从这个 parent 到每个child都是通过指针实现的。

这是一个 btree 的一部分。如您所见,节点“944;1011;1037;1087”有 5 个 children,因此有 5 个指针指向 不同的 节点。这就是维基百科引述所谈论的内容。如果那是一棵二叉树,每个级别将只有 1 个键和 2 个 children.

我想你会感到困惑,因为你已经在 B+ 树中读到 内部节点 中的所有指针都指向 其他 blocks/nodes 在树中。如果需要,您可以将它们称为 树指针 叶节点中的指针指向数据记录或块,(指向下一个叶节点的指针除外)。如果需要,您可以调用这些 数据指针

所以你可以说指针指向两个不同的东西;节点或数据,但这只是组织思想的一种方式。指针仍然只是常规指针,指向某种数据。

来源: Fundamentals of Database Systems (6th Edition) 第6版 作者:Ramez Elmasri(作者)、Shamkant B. Navathe(作者)