B-Tree
A self-balancing tree with many children per node, designed to minimize the number of disk reads a lookup costs.
B-Tree is a self-balancing tree where each node holds many sorted keys and many children — not the two of a binary tree, but often hundreds — chosen specifically to minimize how many nodes a lookup, insert, or range scan has to visit. The design target isn't fewer comparisons, it's fewer disk (or SSD page) reads: a node is sized to fill exactly one storage page, so descending from root to leaf costs one I/O per level, and a high branching factor keeps the tree shallow — a B-tree over a billion rows is typically three or four levels deep, versus roughly thirty for a balanced binary tree over the same data.
This is why a B-tree, not a binary search tree, is the default index structure in essentially every relational database (Postgres, MySQL's InnoDB, SQLite) and filesystem — the bottleneck being optimized against is disk latency, not CPU comparisons, and a binary tree's extra depth translates directly into extra seeks. The B+tree variant, which most databases actually use, keeps all the data in the leaf nodes and chains the leaves together in a linked list, so a range scan (WHERE id BETWEEN 100 AND 200) walks sideways along the leaf level after one descent, rather than re-descending the tree for each value in range.
The self-balancing part matters as much as the fan-out: an insert that overflows a node's capacity splits it and promotes a key upward, keeping every leaf at the same depth no matter the insertion order — unlike an unbalanced binary search tree, which degrades to a linked list (and linear lookup) on already-sorted input. Big-O Notation states this as O(log n) with a very large base for the logarithm, which is the whole point: the same asymptotic class as a binary tree, but with a constant factor small enough that "logarithmic" means single digits of disk reads even at enormous scale.
See also5
Trie
A tree that stores strings by shared prefix, so each node represents a prefix all its descendants extend.
Computation & Algorithms12 connections
Write-Ahead Logging
Recording the intent of a change durably before applying it, so a crash can be recovered.
Computation & Algorithms20 connections
Hash Table
A key-value structure that uses a digest of the key to index an array of buckets.
Computation & Algorithms23 connections
SQLite
A complete SQL database packaged as a small library that stores everything in one file, public domain since 2000, tested to an extreme standard, and probably the most widely deployed database in the world.
Data & Content9 connections
Universally Unique Identifier
A 128-bit identifier that any machine can generate without coordination and still be practically certain no one else will produce the same one.
Data & Content10 connections
Linked from4
- Amortized AnalysisComputation & Algorithms
Averaging cost over a sequence of operations so occasional expensive ones don't distort the per-operation bound.
- SQLiteData & Content
A complete SQL database packaged as a small library that stores everything in one file, public domain since 2000, tested to an extreme standard, and probably the most widely deployed database in the world.
- TrieComputation & Algorithms
A tree that stores strings by shared prefix, so each node represents a prefix all its descendants extend.
- Universally Unique IdentifierData & Content
A 128-bit identifier that any machine can generate without coordination and still be practically certain no one else will produce the same one.