Abstract
A B-tree is compact if it is minimal in number of nodes, hence has optimal space utilization, among equally capacious B-trees of the same order. The space utilization of compact B-trees is analyzed and compared with that of noncompact B-trees and with (node)-visit-optimal B-trees, which minimize the expected number of nodes visited per key access. Compact B-trees can be as much as a factor of 2.5 more space efficient than visit-optimal B-trees; and the node-visit cost of a compact tree is never more than 1 + the node-visit cost of an optimal tree. The utility of initializing a B-tree to be compact (which initialization can be done in time linear in the number of keys if the keys are presorted) is demonstrated by comparing the space utilization of a compact tree that has been augmented by random insertions with that of a tree that has been grown entirely by random insertions. Even after increasing the number of keys by a modest amount, the effects of compact initialization are still felt. Once the tree has grown so large that these effects are no longer discernible, the tree can be expeditiously compacted in place using an algorithm presented here; and the benefits of compactness resume.
- 1 BAYER, R., AND MCCREIGHT, E. Organization and maintenance of large ordered indexes. Acta Informatica 1, 3 (1972), 173-189.Google ScholarDigital Library
- 2 BAYER, R., AND UNTERAUER, K. Prefix B-trees. ACM Trans. Database Syst. 2, 1 (March 1977), 11-26. Google ScholarDigital Library
- 3 KNUTH, D.E. The Art of Computer Programming, vol. 3. Addison-Wesley, Reading, Mass., 1973. Google ScholarDigital Library
- 4 MILLER, R.E., PIPPENGER, N., ROSENBERG, A.L., AND SNYDER, L. Optimal 2,3 trees. SIAM J. Cornput. 8, 1 (1979), 42-59.Google Scholar
- 5 ROSENBERG, A.L., AND SNYDER, L. Minimal comparison 2,3 trees. SIAM J. Comput. 7, 4 {1978), 465-480.Google ScholarCross Ref
- 6 SNYDER, L. On uniquely represented data structures. Proc. 18th Annu. Conf. Foundations of Computer Science, 1977, pp. 412-417.Google Scholar
- 7 YAO, A.C. On random 2,3 trees. Acta Informatica 9, 3 (1978), 159-170.Google ScholarDigital Library
Index Terms
- Time- and space-optimality in B-trees
Recommendations
The string B-tree: a new data structure for string search in external memory and its applications
We introduce a new text-indexing data structure, the String B-Tree, that can be seen as a link between some traditional external-memory and string-matching data structures. In a short phrase, it is a combination of B-trees and Patricia tries for ...
Two Access Methods Using Compact Binary Trees
It is shown how a highly compact representation of binary trees can be used as the basis of two access methods for dynamic files, called BDS-trees and S-trees, respectively. Both these methods preserve key-order and offer easy and efficient sequential ...
Compressed B+-trees
The B+-tree and its variants have been reported as the good index structures for retrieving data. Database systems frequently establish the B+-tree style indices for fast access to data records. However, traditional B+-tree index could be a performance ...
Comments