01 - Introduction
Introduction to connecting and querying Azure Cosmos DB for NoSQL.
Introduction
AI applications require data stores that deliver consistent low-latency performance while scaling to meet unpredictable demand. Azure Cosmos DB for NoSQL provides a globally distributed, schemaless document database that supports flexible JSON data models and automatic indexing.
The Real-World Scenario
Imagine you're a developer building an AI-powered recommendation engine for an e-commerce platform. Your application needs to:
- Store product catalogs, user preferences, and interaction history as JSON documents.
- Retrieve relevant products based on category, price range, and user attributes within milliseconds.
The Problem with Traditional Relational Databases:
- They struggle to keep up with peak traffic.
- Schema changes require lengthy migrations that slow down feature development.
The Cosmos DB Solution:
- Schema Flexibility: Evolve your data models without downtime.
- Automatic Indexing: By default, it automatically indexes properties in your items, reducing upfront setup. (You can still add custom composite indexes later for specific
ORDER BYpatterns). - Independent Scaling: Scale throughput independently of storage to handle traffic spikes during promotional events.
Learning Objectives
In this module, you will learn how to structure data, connect securely, and write efficient queries that minimize Request Unit (RU) consumption while delivering results to AI models. Specifically, you will be able to:
- Explain the Resource Model: Understand how databases, containers, and items relate to each other.
- Implement SDK Operations: Connect to Azure Cosmos DB and perform CRUD operations on items using the Python
azure-cosmoslibrary. - Optimize Retrievals: Select between point reads and queries based on performance requirements and access patterns.
- Build SQL Queries: Filter, project, and retrieve data from containers using SQL syntax.
11 - Build queries for Azure Cosmos DB for NoSQL
Learn how to connect to Azure Cosmos DB for NoSQL using the SDK, perform data operations on items, and write efficient SQL queries to retrieve document data for AI applications.
02 - Explore Azure Cosmos DB for NoSQL
Learn the core concepts of Azure Cosmos DB for NoSQL including resource hierarchy, partitioning, throughput, and request units.
