Lably
Skip to content

B-tree

Tree-based computer data structure

  • 28 min read
  • 9 chapters

Related on Lably

Through Computer science, Database and File system

By allowing more children under one node than a regular self-balancing binary search tree, the B-tree reduces the height of the tree and puts the data in fewer separate blocks. This is especially important for trees stored in secondary storage (e.g., disk drives), as these systems have relatively high latency and work with relatively large blocks of data, hence the B-tree's use in databases and file systems. This remains a major advantage when the tree is stored in memory, as modern computer systems rely heavily on CPU caches. Compared to reading from the cache, reading from memory after a cache miss costs significant time.

History

While working at Boeing Research Labs, Rudolf Bayer and Edward M. McCreight invented B-trees to efficiently manage index pages for large random-access files. Their basic assumption was that indices would be so voluminous that only small chunks of the tree could fit in the main memory. Bayer and McCreight's paper Organization and maintenance of large ordered indices was first circulated in July 1970 and later published in Acta Informatica.

Bayer and McCreight never explained what, if anything, the B stands for; Boeing, balanced, between, broad, bushy, and Bayer have been suggested. When asked, "I want to know what B in B-Tree stands for," McCreight answered:

Everybody does!

So you just have no idea what a lunchtime conversation can turn into. So there we were, Rudy and I, at lunch. We had to give the thing a name.... We were working for Boeing at the time, but we couldn't use the name without talking to the lawyers. So there's a B.

It has to do with Balance. There's another B.

Rudy was the senior author. Rudy (Bayer) was several years older than I am, and had... many more publications than I did. So there's another B.

And so at the lunch table, we never did resolve whether there was one of those that made more sense than the rest.

What Rudy likes to say is, the more you think about what the B in B-Tree means, the better you understand B-Trees!

Sign in to keep reading

8 more chapters are free with a Lably account.

More in Theoretical computer science