Introduction to B-Trees
Posted on Jan 23, 2008, 5:00 am
The b-tree data structure is container system somewhat like a binary tree (although the “b” stands for balanced and the tree is not binary). The API to a b-tree is usually similar to other key-to-data systems such as a hash table, dictionary, or associative array. B-trees are often used for file system indexing and database indexing. The performance gains for a b-tree rely on having a block based memory system (such as disk sectors or cache lines) wherein the cost to get another block far outweighs the cost of doing multiple tests on data in the currently accessible block.