Vector Databases: Searching by Meaning, Not Keywords
A vector database finds "what's most like this?" instead of "find me exactly this." It organizes data by semantic meaning, not just exact values, making it ideal for recommendation engines, semantic search, or finding similar images.
WHY IT EXISTS Traditional databases are built for exact matches. They excel at finding a user with id=123 or products where category='shoes'. They fail when the query is "find articles with a similar meaning" or "show me images that feel like this one." Vector databases were created to solve this problem of searching by semantic similarity rather than by exact, structured data.
THE MENTAL MODEL A vector database is like a map of concepts. Instead of storing data in rows and columns, it converts data (text, images, audio) into numerical representations called embeddings, which are points in a high-dimensional space. The database's job is to find the points (vectors) on this map that are closest to your query point. On this map, "closeness" means "semantically similar."
HOW IT WORKS First, your data is converted into vector embeddings by a machine learning model. The vector database then stores these vectors. When you provide a query—which is also converted into a vector—the database doesn't scan every single stored vector. Instead, it uses specialized Approximate Nearest Neighbor (ANN) algorithms. These algorithms efficiently navigate the vector space to find vectors that are "close enough" to your query vector, trading perfect accuracy for massive speed improvements.
WHEN TO USE IT Use a vector database when your primary goal is to find similar items based on meaning or features. This is ideal for semantic search (finding documents that mean the same thing), multi-modal search (finding images that match a text description), recommendation engines, and as the knowledge base for Retrieval-Augmented Generation (RAG) in LLM applications.
WHEN NOT TO USE IT Do not use a vector database when you need exact, transactional data retrieval. It is not a replacement for a relational (SQL) or key-value database for tasks like storing user accounts or processing financial transactions, where a "probably correct" answer is unacceptable. It complements traditional databases, it doesn't replace them.
ONE CANONICAL EXAMPLE A user on an e-commerce site clicks on a blue running shoe. To recommend similar products, the system converts the shoe's image and description into a vector. It queries the vector database for the nearest neighbors to that vector. The database returns other shoes that are close in the vector space—perhaps other running shoes or other blue footwear—even if their text descriptions don't have overlapping keywords.
Read the original → en.wikipedia.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.