Traditional databases excel at exact matches and range queries — find every order placed in March, return the user with this email. Vector databases are built for a different problem: finding items that are similar to a query, where similarity is defined by mathematical distance in a high-dimensional space rather than literal field equality.

The mechanic underneath is straightforward. An embedding model converts text, images, audio, or structured data into a vector — a list of typically 768 to 3,072 floating-point numbers — that captures the meaning of the input. Two pieces of content with similar meaning end up close to each other in that high-dimensional space. When you embed a user query and search for the closest document embeddings, you are doing semantic retrieval: matching by meaning, not keywords. Searching "how do I cancel my subscription" can surface a doc titled "Closing your account" without sharing a single word.
Doing this naively is slow. Computing distance against every vector in a million-row index is millions of floating-point operations per query. Vector databases solve this with approximate nearest neighbor (ANN) indexes — HNSW (Hierarchical Navigable Small World), IVF (Inverted File Index), and similar structures that trade a small amount of recall for query times measured in milliseconds at billion-vector scale.
The market splits into three patterns. Specialized hosted services like Pinecone and Weaviate handle the operational work and offer rich filtering, hybrid search, and metadata indexing. Postgres extensions like pgvector let teams reuse their existing operational database for moderate vector workloads — simpler to operate but tops out earlier. Open-source self-hosted options like Qdrant and Milvus suit teams with strict data residency or cost requirements. The right choice depends on scale, latency budget, and how much of your stack you want to operate.
Vector databases are the storage layer that makes RAG practical at scale. They also power product recommendations ("more like this"), duplicate detection, semantic code search, image similarity, and any feature that asks the question find things like this one rather than find the exact match.