B Trees

A self-balancing tree data structure used for efficient storage and retrieval.

What is a B Tree?

A B Tree is a search tree where each node can store multiple values and have multiple children. Unlike a regular binary search tree, a B Tree is designed to keep the tree shallow, which reduces the number of memory accesses needed when reading from disk.

B Tree Properties

Node Types

B Tree nodes are named by how many children they have:

Example Diagram

B Tree diagram example

Why Use B Trees?

B Trees are commonly used in databases and file systems because they minimize disk reads. Each node access can return many values at once, making searches much faster on large datasets.

Learn More

B Tree - Wikipedia