StudyToCert

All certifications / AI-200 / Lessons

Microsoft Certified: Azure AI Cloud Developer Associate AI-200 (replaced AZ-204) · Domain 2: Develop AI solutions by using Azure data management services

Choosing the store: Cosmos DB vs PostgreSQL + pgvector vs Redis for a given AI workload

▶ Watch the overview video

Last reviewed October 6, 2026 · Leer en español

Explain it simpler

All three Azure services in this lesson can store embeddings and find similar ones, so you choose based on everything else about the job. Cosmos DB is like a giant, worldwide filing system for flexible documents that can grow almost without limit. PostgreSQL with pgvector is like a well-organized spreadsheet system with tables that link to each other, great when your AI search must connect to orders or customers. Redis is like the sticky notes on your desk: incredibly fast, but small and meant for things you can recreate. Many real apps use two of them together, such as PostgreSQL for the real records and Redis in front to remember recent answers.

The architecture review at Harborview Travel, a fictional booking company, has stalled. Three engineers each champion a different store for the new trip-planning assistant. Ines wants Cosmos DB because travelers use the app on three continents. Raj wants PostgreSQL with pgvector because bookings, customers and loyalty points already live there. Wen wants Redis because the assistant must feel instant. All three can store vectors and run similarity search, so the arguments go in circles. The chief architect finally asks a different question: what does this workload need most, and could the right answer be more than one store?

The exam likes scenario questions that describe an AI workload and ask which data service fits. All three services in this domain, Azure Cosmos DB for NoSQL, Azure Database for PostgreSQL flexible server with pgvector, and Azure Managed Redis, can store vectors and answer similarity queries. Because vector support is not the differentiator, the decision turns on everything else: the shape of the data, the scale and geographic spread, latency targets, durability, existing skills and systems, and how the vectors relate to the rest of the application. Read each scenario for those clues before you think about vectors at all.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 5 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study AI-200 for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the AI-200 study plan