skip to main content
research-article

Deletion without rebalancing in multiway search trees

Published: 06 January 2014 Publication History

Abstract

Some database systems that use a form of B-tree for the underlying data structure do not do rebalancing on deletion. This means that a bad sequence of deletions can create a very unbalanced tree. Yet such databases perform well in practice. Avoidance of rebalancing on deletion has been justified empirically and by average-case analysis, but to our knowledge, no worst-case analysis has been done. We do such an analysis. We show that the tree height remains logarithmic in the number of insertions, independent of the number of deletions. Furthermore, the amortized time for an insertion or deletion, excluding the search time, is O(1), and nodes are modified by insertions and deletions with a frequency that is exponentially small in their height. The latter results do not hold for standard B-trees. By adding periodic rebuilding of the tree, we obtain a data structure that is theoretically superior to standard B-trees in many ways. Our results suggest that rebalancing on deletion not only is unnecessary but may be harmful.

References

[1]
G. M. Adelson-Velskii and E. M. Landis. 1962. An algorithm for the organization of information. Sov. Math. Dokl. 3, 1259--1262.
[2]
Alok Aggarwal and Jeffrey, S. Vitter. 1988. The input/output complexity of sorting and related problems. Commun. ACM 31, 9, 1116--1127.
[3]
Arne Andersson. 1993. Balanced search trees made simple. In Proceedings of the 3rd Workshop on Algorithms and Data Structures (WADS). 60--71.
[4]
Rudolf Bayer. 1971. Binary B-trees for virtual memory. In Proceedings of the SIGFIDET Workshop on Data Description, Access and Control. 219--235.
[5]
Rudolf Bayer. 1972. Symmetric binary B-trees: Data structure and maintenance algorithms. Acta Inf. 1, 290--306.
[6]
Rudolf Bayer and Edward M. McCreight. 1972. Organization and maintenance of large ordered indexes. Acta Informatica 1, 3, 173--189.
[7]
Douglas Comer. 1979. The ubiquitous B-tree. Comput. Sur. 11, 2, 121--137.
[8]
J. Gray and A. Reuter (Eds.). 1993. Transaction Processing: Concepts and Techniques. Morgan Kaufmann, San Mateo, CA. 851--876.
[9]
Leo J. Guibas and Robert Sedgewick. 1978. A dichromatic framework for balanced trees. In Proceedings of the 19th IEEE Symposium on Foundations of Computer Science (FOCS). 8--21.
[10]
Bernhard Haeupler, Siddhartha Sen, and Robert E. Tarjan. 2009. Rank-balanced trees. In Proceedings of the 11th International Symposium on Algorithms and Data Structures (WADS). 351--362.
[11]
Bernhard Haeupler, Siddhartha Sen, and Robert E. Tarjan. 2014. Rank-balanced trees. ACM Trans. Algorithms. To appear.
[12]
S. Huddleston and K. Mehlhorn. 1981. Robust balancing in B-trees. In Proceedings of the GI-Conference on Theoretical Computer Science. Lecture Notes in Computer Science, vol. 104, Springer-Verlag, Berlin, 234--244.
[13]
Scott Huddleston and Kurt Mehlhorn. 1982. A new data structure for representing sorted lists. Acta Informatica 17, 2, 157--184.
[14]
Jan Jannink. 1995. Implementing deletion in B+-trees. SIGMOD Record 24, 1, 33--38.
[15]
T. Johnson and D. Shasha. 1989. Utilization of B-trees with inserts, deletes and modifies. In Proceedings of the 8th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS). 235--246.
[16]
Theodore Johnson and Dennis Shasha. 1993. B-Trees with inserts and deletes: Why free-at-empty is better than merge-at-half. J. Comput. System Sci. 47, 1, 45--76.
[17]
D. Maier and S. C. Salveter. 1981. Hysterical B-trees. Inf. Proc. Lett. 12, 4, 199--202.
[18]
J. Metzger. 1975. Managing simultaneous operations in large ordered indexes. Tech. rep. Technische Universität München, Institut für Informatik, TUM-Math.
[19]
C. Mohan and Frank Levine. 1992. ARIES/IM: An efficient and high concurrency index management method using write-ahead logging. SIGMOD Record 21, 2, 371--380.
[20]
J. Nievergelt and E. M. Reingold. 1973. Binary search trees of bounded balance. SIAM J. Comput. 2, 1 (1973), 33--43.
[21]
Henk J. Olivié. 1982. A new class of balanced search trees: Half balanced binary search trees. Informatique Theorique 16, 1 (1982), 51--71.
[22]
Michael A. Olson, Keith Bostic, and Margo I. Seltzer. 1999. Berkeley DB. In Proceedings of the USENIX Annual Technical Conference (ATC), FREENIX Track. 183--191.
[23]
Michael A. Olson, Keith Bostic, and Margo I. Seltzer. 2000. Berkeley DB. http://www.oracle.com/us/products/database/berkeley-db/overview/index.html.
[24]
Behrokh Samadi. 1976. B-Trees in a system with multiple users. Inf. Proc. Lett. 5, 4, 107--112.
[25]
Robert Sedgewick. 2008. Left-leaning red-black trees. http://www.cs.princeton.edu/∼rs/talks/LLRB/LLRB.pdf.
[26]
Siddhartha Sen and Robert E. Tarjan. 2009. Deletion without rebalancing in multiway search trees. In Proceedings of the 20th International Symposium on Algorithms and Computation (ISAAC). 832--841.
[27]
Siddhartha Sen and Robert E. Tarjan. 2010. Deletion without rebalancing in balanced binary trees. In Proceedings of the 21st ACM-SIAM Symposium on Discrete Algorithms (SODA). 1490--1499.
[28]
R. E. Tarjan. 1985. Amortized computational complexity. SIAM J. Algebraic Disc. Methods 6, 306--318.
[29]
Bin Zhang and Meichun Hsu. 1989. Unsafe operations in B-trees. Acta Informatica 26, 5, 421--438.

Cited By

View all
  • (2022)HybriDSProceedings of the 34th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3490148.3538591(321-332)Online publication date: 11-Jul-2022
  • (2016)Balancing CPU and network in the cell distributed B-tree storeProceedings of the 2016 USENIX Conference on Usenix Annual Technical Conference10.5555/3026959.3027001(451-464)Online publication date: 22-Jun-2016
  • (2016)Deletion Without Rebalancing in Binary Search TreesACM Transactions on Algorithms10.1145/290314212:4(1-31)Online publication date: 2-Sep-2016

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Database Systems
ACM Transactions on Database Systems  Volume 39, Issue 1
January 2014
317 pages
ISSN:0362-5915
EISSN:1557-4644
DOI:10.1145/2576988
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 06 January 2014
Accepted: 01 October 2013
Revised: 01 September 2013
Received: 01 August 2012
Published in TODS Volume 39, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. B-trees
  2. I/O model
  3. amortized complexity
  4. database access methods
  5. exponential potential function

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)0
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2022)HybriDSProceedings of the 34th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3490148.3538591(321-332)Online publication date: 11-Jul-2022
  • (2016)Balancing CPU and network in the cell distributed B-tree storeProceedings of the 2016 USENIX Conference on Usenix Annual Technical Conference10.5555/3026959.3027001(451-464)Online publication date: 22-Jun-2016
  • (2016)Deletion Without Rebalancing in Binary Search TreesACM Transactions on Algorithms10.1145/290314212:4(1-31)Online publication date: 2-Sep-2016

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media