We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Database Types Storage
Free preview: the first 2 parts of this 7-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Database Types Storage
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
You search for "affordable places to live with good weather" on a traditional search engine. It looks for documents containing those exact words. "affordable," "places," "live," "good," "weather." If a blog post about "budget-friendly cities with year-round sunshine" doesn't contain your exact keywords, you'll never find it. Same meaning, different words.
Now imagine a search system that understands meaning. You type your query, the system converts it into a mathematical representation of its meaning, a vector of 1,536 numbers, and finds the documents whose vectors are closest to yours in meaning-space. The blog about "budget-friendly cities with sunshine" is mathematically close to "affordable places with good weather," even though they share almost no words.
This is what vector databases enable. They store and search , high-dimensional vectors that capture the semantic meaning of text, images, audio, or any other data. An embedding model (like OpenAI's text-embedding-3-small or Sentence Transformers) converts data into these vectors, and the vector database finds the most similar ones.
Vector databases are the infrastructure behind:
A vector is just a list of numbers: [0.12, -0.45, 0.89, 0.03, ...]. In machine learning, these numbers represent features of the data, dimensions of meaning.
An is a vector produced by a trained model that captures the semantic essence of the input.
"The cat sat on the mat" → [0.12, -0.34, 0.56, 0.78, ..., 0.91] (1,536 dimensions)
"A kitten was resting on a rug" → [0.11, -0.33, 0.55, 0.79, ..., 0.90] (very similar!)
"Stock prices fell today" → [0.87, 0.23, -0.91, 0.04, ..., -0.67] (very different)
Notice: the cat sentences produce nearly identical vectors because they mean nearly the same thing. The stock market sentence produces a completely different vector because the meaning is unrelated.
Similarity is measured by distance. The two most common metrics:
: Measures the angle between two vectors. Values range from -1 (opposite meaning) to 1 (identical meaning). This is the most common metric for text embeddings because it ignores magnitude and focuses on direction.
Euclidean distance (L2): Measures the straight-line distance between two points in vector space. Smaller = more similar.
The core operation of a vector database: given a query vector, find the K vectors in the database closest to it. This is the K-nearest neighbors (KNN) problem.
It is easy and good
“It is really nice and good Please join the course”