Difference Between B Tree and B+ Tree
Difference Between B Tree and B+ Tree
Basis of
B-tree B+ tree
Comparison
All internal and leaf nodes have data Only leaf nodes have data
Pointers
pointers pointers
All keys are at leaf nodes,
Since all keys are not available at
Search hence search is faster and
leaf, search often takes more time.
more accurate.
Duplicate of keys are
Redundant No duplicate of keys is maintained in
maintained and all nodes
Keys the tree.
are present at the leaf.
Insertion is easier and the
Insertion takes more time and it is not
Insertion results are always the
predictable sometimes.
same.
Deletion of the internal node is very Deletion of any node is
Deletion complex and the tree has to undergo easy because all node are
a lot of transformations. found at leaf.
Leaf nodes are not stored as Leaf nodes are stored as
Leaf Nodes
structural linked list. structural linked list.
Sequential access to nodes is not Sequential access is
Access
possible possible just like linked list
Height is lesser than B-tree
For a particular number nodes height
Height for the same number of
is larger
nodes
B+ Trees used in Multilevel
B-Trees used in Databases, Search
Application Indexing, Database
engines
indexing
Number of Number of nodes at any intermediary Each intermediary node
Nodes level 'i' is 2i. can have n/2 to n children.