Interview Q&A / AI & Generative AI

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What is a vector database, and how is it different from a normal database?

SHORT ANSWER

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

text
SQL:     SELECT * FROM students WHERE roll_no = 241;      -- exact match
Vector:  nearest(query_vector, k = 5, filter = {"year": 2025})  -- most similar

What 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.

#vector-database#rag#search

Related questions

Practise more AI & Generative AI questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open AI & Generative AI quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.