Every time you run a database query like:
SELECT * FROM users WHERE id = 42
the system doesn't scan the entire table.
Instead, it uses an index to find the data in milliseconds. That lightning-fast lookup is almost always powered by a B-Tree or, more commonly, a B+ Tree.
While we learn about data structures like binary search trees in college, they are designed for data that fits in RAM. Databases and file systems deal with datasets that are gigabytes or terabytes in size, stored on slower block devices like SSDs or hard disks. Accessing data from a disk is thousands of times slower than accessing it from memory.
This is where B-Trees and B+ Trees shine. They are specifically designed to minimize the number of disk reads required to find data, making them the perfect choice for indexing large, disk-resident datasets.