family - Advanced Tree Structures The Family of B-Trees(11...

This preview shows pages 1–3. Sign up to view the full content.

Introduction In the previous few sets of notes we’ve examined the multi-way tree and specifically several of the variants known as an m-way search tree. We’ve seen the B-tree and the special variant which restricts the number of keys and children of a node known as the 2-4 tree. In this set of notes we will examine several of the special variants of B-tree 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 m-way trees and specifically that of the m-way 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 B-tree 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 B-tree 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 two-thirds full. Recall that the B-tree has no such restriction which leads to the worst case scenario of the nodes in the tree being only half-full, on the average, with an expected value of only about 69% full, on the average. More precisely, the number of keys, k , in all non-root 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 B-tree. This leads to an average space utilization of 81% for the B*-tree compared to the 69% of the B-tree. The Family of B-Trees - 1 Advanced Tree Structures – The Family of B-Trees (11)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
A 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.

{[ snackBarMessage ]}

Page1 / 13

family - Advanced Tree Structures The Family of B-Trees(11...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online