What is a vector database and how does it differ from a traditional database?
NLPLevel: FoundationVector Databases
What is a vector database and how does it differ from a traditional database?
Hints
- What does closeness mean in this representation and metric?
- Check normalization, exact versus approximate search and alignment with the training objective.
Answer
A traditional database stores structured data and queries by exact or range matching (SQL). A vector database stores high-dimensional vectors and queries by approximate nearest neighbor (ANN) similarity.
| Feature | Traditional DB | Vector DB |
|---|---|---|
| Primary query | Exact/range match | Semantic similarity |
| Indexing | B-tree, hash index | HNSW, IVF, PQ |
| Query type | WHERE column = value | KNN(query_vector, k=10) |
| Data type | Structured | High-dimensional float arrays |
| Scale | Billions of rows easily | Millions–billions of vectors |
Popular choices:
- Pinecone: managed, production-ready, simple API
- Weaviate: open source + cloud, multi-modal, GraphQL
- Qdrant: open source, Rust-based, high performance
- Chroma: simple, local-first, great for development
- pgvector: PostgreSQL extension — good for teams already on Postgres
- Milvus: open source, cloud-native, enterprise scale
Source and licence: JustInCache & contributors — Awesome AI Interviews · Apache-2.0