Start studying
Module 14 · MLOps / LLMOps Module contents
Module 14  ·  Card 4 / 22beginner

Databases

Relational databases such as Postgres store structured, related records.

Document stores such as MongoDB hold flexible, nested JSON.

Vector databases store embeddings for similarity search.

Redis is used as an in-memory cache and queue.

Most ML systems end up using several of these together.

Learn in depth ↓
Module 14 · MLOps / LLMOps · 22 concepts
In depth  /  15 lines

Databases, in more detail

Most machine learning systems end up using several kinds of database together.

Relational databases such as Postgres store structured records with relationships.

They give transactions, constraints and a query language that has outlasted every trend.

This is where users, orders, predictions and audit records belong.

Document stores such as MongoDB hold flexible nested JSON.

They suit data whose shape varies between records.

Vector databases store embeddings and serve similarity search.

Redis holds things in memory for caching, queues and rate-limit counters.

It is fast and volatile, so treat it as a cache rather than a system of record.

Object storage such as S3 holds the large files: datasets, model weights, images.

The common mistake is putting large blobs in a relational database.

Store the file in object storage and the path in the database.

Postgres with pgvector can cover relational and vector needs at moderate scale.

One database is simpler than two, and simplicity is worth a great deal.

Choose by access pattern rather than by fashion, since most workloads are ordinary.

Want the full technical article? Wikipedia ↗
Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
Which of these is normally used as an in-memory cache and queue?
MLOps / LLMOps

22 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close