Database Index¶
A maintained auxiliary structure mapping declared key values or predicates to database rows so selected retrieval and ordering become faster at a storage and update cost.
Core Idea¶
A database index copies or derives key information from a base relation and arranges it for a particular family of access paths. Entries either point back to rows or include enough additional columns to answer a query directly.
The speedup is conditional rather than magical. Tree, hash, bitmap, spatial, full-text, expression, and partial indexes support different predicates. Every index consumes storage and must be kept transactionally consistent as rows are inserted, changed, or removed.
How would you explain it like I'm…
The Back-of-the-Book Finder
Shortcut List for Finding Rows
Access-Path Lookup Structure
Scope of Application¶
- Point lookup. Finds rows matching exact key values.
- Range access. Traverses ordered keys between bounds.
- Ordering. Returns rows in index order when semantics match.
- Constraint enforcement. Supports uniqueness and related integrity checks.
- Covering queries. Answers from stored keys and included values.
- Specialized search. Indexes text, geometry, arrays, or expressions with tailored operators.
Clarity¶
Record table, key expressions, sort direction, collation, predicate, included values, structure type, uniqueness, size, selectivity, maintenance burden, and observed query plan. Benchmark representative reads and writes. Inclusion test: Require an auxiliary structure associated with base data, a declared key or predicate, a row-location or covering relation, and a maintenance rule preserving consistency. Exclusion test: Exclude unsorted duplicate tables, transient query results, application caches without database consistency, and constraints that have no supporting access structure. Nearest boundary: A table partition reorganizes the base relation into pieces; an index remains auxiliary and maps key conditions toward relevant rows, although systems may combine both. Exit condition: The identity fails when the structure neither points to authoritative rows nor remains synchronized with their relevant values. Common misclassifications: It is not a second authoritative copy of the table. It is not guaranteed to improve every query. It is not merely a sorted report. It is not free of storage and write cost. Nearest named distinctions: Materialized View: Stores a query result rather than primarily mapping keys to base rows. Cache: May be disposable or weakly consistent and need not preserve database access semantics. Table Partition: Divides authoritative storage rather than adding an auxiliary mapping. Inverted Index: A specialized database or search index mapping terms to documents. Primary Key: A logical uniqueness constraint often, but not universally, enforced by an index.
Manages Complexity¶
The abstraction separates logical rows from a redundant access path, allowing designers to trade space and update work for fewer comparisons or page reads. Explicit key and predicate semantics prevent misplaced confidence.
Abstract Reasoning¶
- Characterize the workload and expensive predicates.
- Choose key expressions and an access structure matching those operators.
- Define coverage, ordering, uniqueness, and any partial predicate.
- Build entries and map them to rows transactionally.
- Measure planner use, latency, size, and write amplification.
- Remove or redesign indexes whose maintained cost exceeds demonstrated value.
Knowledge Transfer¶
The transferable cargo is a maintained key-to-record access path. It transfers to search and storage systems when authoritative data, key semantics, consistency, and cost are preserved; an unmanaged cache is only analogous.
Neighborhood in Abstraction Space¶
Database Index sits in a crowded region of the domain-specific corpus (32nd percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.
Family — Matrices, Measures & Numeric Structures (30 abstractions)
Nearest neighbors
- Schema-Agnostic Database Access — 0.90
- X + Y Sorting — 0.89
- Distance Matrix — 0.89
- Query Theory — 0.89
- Inelative Case — 0.88
Computed from structural-signature embeddings · 2026-10-08