Most general-purpose indexes (the default in Postgres, MySQL's InnoDB, SQL Server, SQLite) are B-trees (or one of its variants, B+trees) — a balanced tree structure where every leaf is the same distance from the root, keeping lookups predictable regardless of which value you're searching for.
= 'Sales') but also range queries (salary BETWEEN 50000 AND 70000, ORDER BY salary) by walking the sorted leaves — this is a genuinely important property that distinguishes a B-tree from a hash index, which only supports exact-match lookups efficiently.A hash index (available in some engines as an alternative index type) trades away range-query support for theoretically faster exact-match lookups — it's rarely the default and rarely worth reaching for unless a specific workload is proven to be exact-match-only and lookup-latency-critical.