Prompt
do i need a separate database for embeddings and metadata?
Latest observation
Oct 7, 2026
OpenAI APIWeb search: off
Not necessarily.
You have a few common options:
1) Store embeddings and metadata in the same database
This is often the simplest choice.
- Relational DBs like Postgres can store:
- the embedding vector
- metadata columns
- the original text or document reference
- With the right extension/indexing, you can do vector search there too.
Good when:
- you want simpler architecture
- your scale is moderate
- metadata filtering is important
- you want one source of truth
2) Use a dedicated vector database + separate metadata store
Sometimes people keep:
- embeddings in a vector DB
- metadata in Postgres / MongoDB / etc.
Good when:
- you have very large scale
- vector search performance is the main concern
- metadata is complex or managed by another system
- you want to optimize each store for its job
3) Store everything in a vector database that also supports metadata
Many vector databases allow you to attach metadata fields directly to each vector.
Good when:
- you want fast similarity search
- metadata is mostly for filtering and display
- you don’t need advanced relational queries
Practical recommendation
If you’re just starting out, don’t use a separate database unless you have a reason.
A very common setup is:
- Postgres + pgvector for embeddings and metadata together
That gives you:
- one database
- vector search
- SQL filtering
- simpler maintenance
When to separate them
Consider a separate DB if:
- embeddings are extremely large in volume
- you need very high vector search throughput
- metadata needs frequent joins/transactions
- different teams own the systems
- you expect to migrate or reindex embeddings often
If you want, I can suggest the best setup for your specific use case (RAG app, semantic search, recommendation system, etc.).