Database B-Tree

Visualize how databases use B-Trees for indexing — insert keys and watch the tree split and grow.

Category: Algorithms · v1.0.0
Keys
0
Height
0
Nodes
0
Last Op

B-Tree of order 3 (max 2 keys per node, 3 children)

About This Simulator

B-Trees are the backbone of database indexing. This simulator shows how a B-Tree of order 3 (2-3 tree) organizes keys as they're inserted. Watch nodes split when they overflow, keys get promoted to parent nodes, and the tree grows in height while staying perfectly balanced. Understand why B-Trees are ideal for disk-based storage with their wide, shallow structure.

How It Works

  1. Enter a numeric key and click Insert to add it to the B-Tree
  2. Watch the tree restructure — nodes split when they exceed capacity
  3. Click Random to insert multiple random keys at once
  4. Observe how the tree stays balanced regardless of insertion order
  5. Click Search to highlight the lookup path for a key
  6. Click Clear to start fresh