RAG 與知識系統

What Are Vector Databases? How They Differ from Traditional Databases, and When You Actually Need One

Vendors claim you must buy a dedicated vector database to implement RAG. This isn't true in most enterprise contexts. What follows explains what vector databases are, how they differ from traditional databases, and why not every RAG implementation requires one. The decision comes down to two numbers.

By

Tenten AI 研究團隊

AI 基礎設施

Published

January 24, 2026

Read time

6 分鐘

向量資料庫RAG企業知識系統AI 導入技術選型語意搜尋

A vector database transforms unstructured data like text, images, and audio into high-dimensional numeric vectors (embeddings), stores them, and retrieves them by semantic similarity rather than exact keyword matching. Ask how to report employee travel lodging expenses, and it can surface a document titled Business Travel Expense Reimbursement Policy, even if the two phrases share no words. This semantic matching is the fundamental difference between vector and traditional databases.

Traditional databases search for exact matches; vector databases search for meaning

Traditional relational databases like MySQL and PostgreSQL excel at exact queries. WHERE 客戶編號 = 'A123' either returns a match or nothing; no middle ground exists. They require predefined structure: columns, data types, primary keys, foreign keys. This suits transaction systems, accounting, and inventory. You wouldn't want your bank using semantic similarity to calculate your balance.

About 80 percent of enterprise data doesn't follow this shape. Contracts, meeting notes, Slack conversations, support tickets, product manuals are unstructured text that can't fit neatly into columns. The question isn't "equals a specific value" but "what content relates to this idea?" Vector databases handle this by converting text into high-dimensional vectors where semantic closeness becomes spatial distance. Retrieval uses distance calculations, not string matching.

AspectTraditional Relational DatabaseVector Database
Data shapeStructured (columns, types, schema)Unstructured converted to high-dimensional vectors
Query logicExact matching, ranges, JOINsSemantic similarity (nearest neighbors)
Typical question"Orders for customer A123""Sections related to return policy"
Match criteriaComplete equality onlySemantic closeness triggers recall
Best use casesTransactions, accounting, reportsRAG, semantic search, recommendations
WeaknessNo understanding of synonyms or meaningNot suited for exact reconciliation

RAG (retrieval-augmented generation) connects closely to vector databases because large language models need to retrieve relevant internal documents to answer company-specific questions. Semantic search is where vector databases excel.

The myth worth breaking: not every RAG needs a dedicated vector database

Vendors won't welcome this reality: many people believe you must purchase a dedicated vector database (Pinecone, Weaviate, Milvus) before implementing RAG. This assumption doesn't hold in many cases.

The decision is simpler than vendors suggest. Two numbers determine the answer: data volume and query concurrency.

If your knowledge base contains thousands to tens of thousands of documents, a separate vector infrastructure isn't necessary. Add the pgvector extension to your existing PostgreSQL to store vectors and run similarity searches. Query latency at this scale works well. You avoid data migration, preserve existing permission models, and your operations team doesn't need new training. For mid-sized enterprises, the savings often exceed licensing costs.

Even smaller setups need less infrastructure. For a few-hundred-page manual or departmental FAQ, compute vectors, load them into memory, and query directly using a library like FAISS on a single machine. One client built an internal Q&A system with a single file as the backend.

A dedicated vector database becomes necessary when handling tens of millions or hundreds of millions of vectors with millisecond latency, high concurrency, and dynamic add/delete/filter operations. Specialized indexing algorithms (HNSW, IVF) and horizontal scaling justify the investment at this scale. A dedicated database solves a scale problem, not a "can we do RAG?" problem. Identify the scale challenge before buying the solution.

Ask the right questions before you pick

Evaluating a RAG requirement should start with basic questions, not "which vector database should we use?" Ask: How much data? How often does it change? Who queries it? How fast must it respond? What precision matters? The answers determine the technology stack, often suggesting something simpler than vendors recommend.

Vector databases are powerful tools, not prerequisites. Whether an enterprise knowledge system succeeds depends on retrieval quality, data governance, and integration into workflows, not on the backend brand chosen. This principle guides RAG systems everywhere: define the problem correctly, select the simplest sufficient tool, and concentrate effort on the genuinely difficult work, accuracy and adoption.

One stuck workflow
is enough to begin

Tell us what the team does today, where it breaks down, and what a better working day should look like.