B+树

作者: nzdxwl | 来源:发表于2019-12-11 19:32 被阅读0次

B+树是B树的一种变形形式,B+树上的叶子结点存储关键字以及相应记录的地址,叶子结点以上各层作为索引使用。一棵m阶的B+树定义如下:
(1)每个结点至多有m个子女;
(2)除根结点外,每个结点至少有[m/2](向上取整)个子女,根结点至少有两个子女;
(3)有k个子女的结点必有k个关键字。

B+树与B树的不同:
Difference between B Tree and B+ Tree

  B Tree B+ Tree
Short web descriptions A B tree is an organizational structure for information storage and retrieval in the form of a tree in which all terminal nodes are at the same distance from the base, and all non-terminal nodes have between n and 2 n sub-trees or pointers (where n is an integer). B+ tree is an n-array tree with a variable but often large number of children per node. A B+ tree consists of a root, internal nodes and leaves. The root may be either a leaf or a node with two or more children.
Also known as Balanced tree. B plus tree.
Space O(n) O(n)
Search O(log n) O(logb n)
Insert O(log n) O(logb n)
Delete O(log n) O(logb n)
Storage In a B tree, search keys and data stored in internal or leaf nodes. In a B+ tree, data stored only in leaf nodes.
Data The leaf nodes of the tree store pointers to records rather than actual records. The leaf nodes of the tree stores the actual record rather than pointers to records.
Space These trees waste space There trees do not waste space.
Function of leaf nodes In B tree, the leaf node cannot store using linked list. In B+ tree, leaf node data are ordered in a sequential linked list.
Searching Here, searching becomes difficult in B- tree as data cannot be found in the leaf node. Here, searching of any data in a B+ tree is very easy because all data is found in leaf nodes.
Search accessibility Here in B tree the search is not that easy as compared to a B+ tree. Here in B+ tree the searching becomes easy.
Redundant key They do not store redundant search key. They store redundant search key.
Applications They are an older version and are not that advantageous as compared to the B+ trees. Many database system implementers prefer the structural simplicity of a B+ tree.

相关文章

  • B+树

    B+树概况 InnoDB使用了B+树索引模型 每个索引在InnoDB里面对应一棵B+树 B+树特点 m阶B+树每个...

  • 聊一聊B+树

    标签: 图解B+树 | B+树代码|mysql 聚集索引|mysql B+树索引| 前言   虽然B+是B-演化过...

  • mysql 浅析

    索引的结构 B+树 二叉查找树、平衡二叉树 、B树、 B+树 B树: B+树: B+树中各个页之间是通过双向链表连...

  • MySQL B+树介绍

    MySQL B+树介绍 B+树的演变 二叉树 --> 二叉查找树 --> 平衡二叉树 --> B树 --> B+树...

  • B树、B+树、B*树

    1)什么是B树、B+树、B树?2)B树、B+树、B树的作用?3)B树、B+树、B*树的应用场景? 一、什么是B树、...

  • 底层数据结构(B+树 - 查找、插入和删除)

    B+树是什么? B+树是一种树; B+树(或者其子树)代表一个有序的键值对集合,通过键决定键值对顺序; B+树的节...

  • BoltDB(二)page 结构

    B+ 树模型 要明白 B+ 树模型,可以参考:MySQL 数据库索引 -- B+树模型[https://www.j...

  • MySQL:索引

    索引的底层实现 InnoDB存储引擎数据结构使用B+树 B+树 B+数据的基本结构如下图 为什么选用B+树 MyS...

  • MYSQL的索引与B+Tree

    MySQL 索引与 B+ 树 B+ 树 MySQL Innodb 存储引擎是使用 B+ 树来组织索引的。在介绍 B...

  • B+树的几点介绍

    B+树 这个作者通过图文介绍了什么是B+树

网友评论

      本文标题:B+树

      本文链接:https://www.haomeiwen.com/subject/uztagctx.html