Introduction
In the previous few sets of notes we’ve examined the
multiway tree
and
specifically several of the variants known as an
mway search tree.
We’ve seen
the Btree and the special variant which restricts the number of keys and
children of a node known as the 24 tree.
In this set of notes we will examine
several of the special variants of Btree
that have important applications in
computer science.
We won’t examine any of these structures in quite the same
level of detail that we have with the previous structures, rather we’ll give them a
cursory look so that you will be aware of some of these hybrid tree structures.
B*Trees
Recall from our discussions of
mway trees
and specifically that of the
mway
search tree
the importance of the structure for searches in which the retrieved
data from the search is resident in secondary memory.
With a typical Btree
used in this fashion the optimal configuration for the tree occurs when each
node in the tree represents one block of secondary memory.
Therefore,
accessing one node means accessing one block of secondary memory.
This
turns out to be expensive when node itself is in secondary memory.
Therefore,
the fewer nodes that are created, the better.
A B*tree is a variant of the Btree that was introduced by Donald Knuth (and
named by Douglas Comer).
In a B*tree, all the nodes except the root are
required to be at least twothirds full.
Recall that the Btree has no such
restriction which leads to the worst case scenario of the nodes in the tree being
only halffull, on the average, with an expected value of only about 69% full, on
the average.
More precisely, the number of keys,
k
,
in all nonroot nodes of a
B*tree of order
m
is given by:
1
m
k
3
1
m
2

≤
≤

The frequency of node splitting is decreased by delaying a split, and when the
time comes, by splitting two nodes into three nodes rather than one node into
two as in the normal Btree.
This leads to an average space utilization of 81%
for the B*tree compared to the 69% of the Btree.
The Family of BTrees 
1
Advanced Tree Structures –
The Family of BTrees (11)
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentA split in a B*tree is delayed by attempting to redistribute the keys between a
node, its sibling, and the separating key value from the parent when the node
overflows.
Figure 1 illustrates how this redistribution of the keys delays the
node splitting.
In Figure 1(a), a B*tree of order 7 is shown into which a key
value of 6 is to be inserted.
This key value should be inserted into the left most
node of the root, which is already full.
Instead of splitting the node, all the keys
from this node
and
its sibling are evenly divided and the median key value,
which in this example is key value 10, is placed into the parent node (the root in
this case) as shown in Figure 1(b).
Notice that this not only evenly divides the
key values, but also frees space in the node that was originally full.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Summer '09
 Computer Science, key value

Click to edit the document details