Skip to content

Reference

B-Tree

A balanced tree data structure optimized for storage systems that read and write blocks of sorted data.

1 min read

After this, you will understand

How B-Tree helps you see what the term means, where it appears, and why engineers care about it in real systems.

Article guideprerequisites, mental models, and concepts

Article overview

foundationDataTradeoffs

Three useful mental models

In plain terms

Treat the idea as a definition to memorize.

Production pressure

Real systems force the idea to handle Indexing, Disk Locality, and Range Queries.

Better reasoning

Use the concept to decide what the system guarantees, what it risks, and what it costs to operate.

Think before reading

Where would B-Tree appear in a real production system, and what failure or bottleneck would it help you reason about?

As you read, look for the pressure that creates the idea first. The mechanics matter more once the reason is clear.

Concepts Covered

  • B-tree indexes
  • Balanced search trees
  • Disk locality
  • Range scans
  • Page splits
  • Database lookup performance

Definition

A B-tree is a balanced search tree that stores many keys per node. Database storage engines use B-tree variants because they minimize random I/O and preserve sorted order for efficient range scans.

Why systems engineers care

Indexes are not abstract magic. Their shape influences write amplification, read latency, lock behavior, cache locality, and query planning. Understanding B-trees helps explain why some predicates are cheap and others are expensive.

Useful intuition

Compared with a binary tree, a B-tree is wide and shallow. Each node can hold many keys, so a lookup usually touches only a small number of pages.

OperationTypical property
Point lookupTraverses root to leaf
Range scanWalks sorted leaves
InsertMay split pages
DeleteMay rebalance or leave space

Finished reading?

Your reading history is saved in this browser so you can continue later.

Recommended Next

URL Shortener SystemSystem Design16 min read

Return to the recommended System Design journey here. Start with a familiar service and watch production pressure force each architecture decision.

Optional exploration

These links add context, but they do not replace the recommended next lesson.

Related Concepts

Core ideas that connect to this topic.

Arcflow Plus is coming — review drills, research breakdowns, more AI. Get one email at launch.