What is a vector database, and how is it different from a normal database?
A vector database stores embeddings and finds the ones nearest to a query vector quickly, using specialised indexes. A normal database finds rows by exact values or ranges. Vector search finds similar meaning, not equal values.
Explain it simply
A normal database answers "give me the student whose roll number is 241". It is exact. A vector database answers "give me the passages most similar in meaning to this question". It is a nearest-neighbour search.
Each stored item is a vector, usually with an id and metadata such as source, date and language. At query time you embed the question and the database returns the top k closest vectors, often with filters like "only documents from 2025".
Scanning every vector is slow at large scale, so these systems build approximate indexes that trade a tiny loss in accuracy for big speed gains. Many conventional databases now offer vector features too, so the question is often which tool suits your scale and operations, not whether a special product is mandatory.
Example
SQL: SELECT * FROM students WHERE roll_no = 241; -- exact match
Vector: nearest(query_vector, k = 5, filter = {"year": 2025}) -- most similarWhat to say in the interview
"A vector database indexes embeddings for fast similarity search, with metadata filtering. Unlike exact-match lookups, it ranks by closeness in meaning. At small scale a library or a vector extension to an existing database can be enough."
Common mistakes
- Thinking a vector database replaces a normal database for transactions and records.