MS-DP3015: Getting Started with Cosmos DB NoSQL Development

Course Code: MS-DP3015

This course teaches developers to utilize Azure Cosmos DB for NoSQL API and SDK. Students will learn query execution, resource configuration, SDK operations, and design strategies for non-relational data modeling and data partitioning.

  • Duration: 1 Day
  • Level: Intermediate
  • Technology: Azure Data & AI
  • Delivery Method: Instructor-led
  • Training Credits: NA

This course is designed for software engineers who are responsible for creating cloud-native solutions using Azure Cosmos DB for NoSQL and its various SDKs.

Before attending this course, delegates must have:

- Experience in writing code that interacts with SQL or NoSQL database platforms.

- Familiarity with C# programming.

After completion of this course, you will be able to:

- Execute queries efficiently within Azure Cosmos DB. 

- Understand the basics of Azure Cosmos DB and its NoSQL capabilities.

- Learn how to plan and configure resources for Azure Cosmos DB.

- Set up and manage databases and containers within Azure Cosmos DB.

- Utilize the Azure Cosmos DB for NoSQL SDK to interact with the database.

- Design strategies for non-relational data modeling and data partitioning.

There is no Associated Certification or Exam for this course.

Download our course content

Click Here

Modules

Learn about the Azure Cosmos DB for NoSQL and determine if it is a good fit for your application.

Lessons

- Introduction.

- What is Azure Cosmos DB for NoSQL.

- How does Azure Cosmos DB for NoSQL work.

- When should you use Azure Cosmos DB for NoSQL.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Evaluate whether Azure Cosmos DB for NoSQL is the right database for your application.

- Describe how the features of the Azure Cosmos DB for NoSQL are appropriate for modern applications.

Learn how to use the Azure Cosmos DB for NoSQL to create an account, and then use the account to create Cosmos DB resources.

Lessons

- Introduction.

- Explore resources.

- Review basic operations.

- Exercise: Create an Azure Cosmos DB for NoSQL account.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Create a new Azure Cosmos DB for NoSQL account.

- Create database, container, and item resources for an Azure Cosmos DB for NoSQL account.

Examine the Microsoft Azure architecture, and components used, when deploying SAP S/4HANA workloads and in-memory SAP HANA databases, running on Azure Virtual Machines infrastructure.

Lessons

- Introduction.

- Understand throughput.

- Evaluate throughput requirements.

- Evaluate data storage requirements.

- Time-to-live (TTL).

- Plan for data retention with time-to-live (TTL).

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Evaluate various requirements of your application.

Select between the various throughput offerings in Azure Cosmos DB for NoSQL.

Lessons

- Introduction.

- Serverless.

- Compare serverless vs. provisioned throughput.

- Autoscale throughput.

- Compare autoscale vs. standard (manual) throughput.

- Migrate between standard (manual) and autoscale throughput.

- Exercise: Configure throughput for Azure Cosmos DB SQL API with the Azure portal.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Compare the various service and throughput offerings for Azure Cosmos DB

- Migrate between standard and autoscale throughput.

Migrate data into and out of Azure Cosmos DB for NoSQL using Azure services and open-source solutions.

Lessons

-Introduction.

- Understand SQL query language.

- Create queries with SQL.

- Project query results

- Implement type-checking in queries.

- Use built-in functions.

- Execute queries in the SDK.

- Exercise: Execute a query with the Azure Cosmos DB for NoSQL SDK.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Create and execute a SQL query.

- Project query results.

- Use built-in functions in a query.

This module covers how to provision an Azure Kubernetes Service cluster and validate the effect of Azure Policy.

Lessons

- Introduction.

- Understand the SDK.

- Import from package manager.

- Connect to an online account.

- Implement client singleton.

- Configure connectivity mode.

- Exercise: Connect to Azure Cosmos DB for NoSQL with the SDK.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Integrate the Microsoft.Azure.Cosmos SDK library from NuGet.

- Connect to an Azure Cosmos DB for NoSQL account using the SDK and .NET. 

Learn how to configure the Azure Cosmos DB for NoSQL SDK in various ways including how to integrate with the emulator, implement parallelism, and create a custom logger.

Lessons

- Introduction.

- Enable offline development.

- Handle connection errors.

- Implement threading and parallelism.

- Configure logging.

- Exercise: Configure the Azure Cosmos DB for NoSQL SDK for offline development.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Compare the various service and throughput offerings for Azure Cosmos DB.

- Migrate between standard and autoscale throughput.

Write code to create, read, update, and delete items in Azure Cosmos DB for NoSQL.

Lessons

- Introduction.

- Understand point operations.

- Create documents.

- Read a document.

- Update documents.

- Configure time-to-live (TTL) value for a specific document.

- Delete documents.

- Exercise: Create and update documents with the Azure Cosmos DB for NoSQL SDK.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Perform CRUD operations using the SDK.

- Configure TTL for a specific item.

Perform operations on multiple items in single logical units of work.

Lessons

- Introduction.

- Create a transactional batch with the SDK.

- Review batch operation results with the SDK.

- Exercise: Batch multiple point operations together with the Azure Cosmos DB for NoSQL SDK

- Implement optimistic concurrency control.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Implement a correlated subquery.

- Create a cross-product query.

Perform bulk operations on Azure Cosmos DB in bulk from code using the SDK.

Lessons

- Introduction.

- Create bulk operations with the SDK.

- Review bulk operation caveats.

- Implement bulk best practices.

- Exercise: Move multiple documents in bulk with the Azure Cosmos DB for NoSQL SDK.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Use C# task asynchronous programming model and "bulk" support in the Azure Cosmos DB for NoSQL .NET SDK.

Author queries for Azure Cosmos DB for NoSQL using the SQL query language.

Lessons

- Introduction.

- Understand SQL query language.

- Create queries with SQL.

- Project query results

- Implement type-checking in queries.

- Use built-in functions.

- Execute queries in the SDK.

- Exercise: Execute a query with the Azure Cosmos DB for NoSQL SDK.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Create and execute a SQL query.

- Project query results.

- Use built-in functions in a query.

Create SQL queries for Azure Cosmos DB for NoSQL that uses subqueries or cross-products.

Lessons

- Introduction.

- Create cross-product queries.

- Implement correlated subqueries.

- Implement variables in queries.

- Paginate query results.

- Exercise: Paginate cross-product query results with the Azure Cosmos DB for NoSQL SDK.

- Knowledge check.

By the end of this module, you'll be able to:

- Implement a correlated subquery

- Create a cross-product query

Create custom indexing policies for Azure Cosmos DB for NoSQL containers.

Lessons

- Introduction.

- Understand indexes.

- Understand indexing policies.

- Review indexing policy strategies.

- Exercise: Review the default index policy for an Azure Cosmos DB for NoSQL container with the portal.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Create and execute a SQL query.

- Project query results.

- Use built-in functions in a query.

Customize indexing policies for a container in Azure Cosmos DB for NoSQL

Lessons

- Introduction.

- Customize the indexing policy.

- Evaluate composite indexes.

- Exercise: Configure an Azure Cosmos DB for NoSQL container's index policy with the portal.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Implement a correlated subquery.

- Create a cross-product query.

Process changes feed events using the change feed processor in the Azure Cosmos DB for NoSQL .NET SDK.

Lessons

- Introduction.

- Understand change feed features in the SDK.

- Implement a delegate for the change feed processor.

- Implement the change feed processor.

- Implement the change feed estimator.

- Exercise: Process change feed events using the Azure Cosmos DB for NoSQL SDK.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Create a change feed processor in the .NET SDK.

- Author a delegate to handle a batch of changes in a client-side application.

Use Azure Functions bindings to integrate a function with Azure Cosmos DB for NoSQL.

Lessons

- Introduction.

- Understand Azure Function bindings for Azure Cosmos DB for NoSQL.

- Configure function bindings.

- Develop function.

- Exercise: Process Azure Cosmos DB for NoSQL data using Azure Functions.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Create an Azure Function using the Azure Cosmos DB trigger.

Index Azure Cosmos DB for NoSQL data with Azure Cognitive Search.

Lessons

- Introduction.

- Create an indexer for data in Azure Cosmos DB for NoSQL.

- Implement a change detection policy.

- Manage a data deletion detection policy.

- Exercise - Search data using Azure Cognitive Search and Azure Cosmos DB for NoSQL.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Create an indexer to migrate data from Azure Cosmos DB for NoSQL to an Azure Cognitive Search index.

Identify an application’s key access patterns. Define the entities’ data model, along with containers to store the data with a partition key that will result in an efficient and scalable data store for the application.

Lessons

- Introduction.

- What's the difference between NoSQL and relational databases?

- Identify access patterns for your app.

- When to embed or reference data.

- Exercise: Measure performance for customer entities.

- Choose a partition key.

- Model small lookup entities.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Determine access patterns for data.

- Apply data model and partitioning strategies to support an efficient and scalable NoSQL database.

Identify strategies for managing relationships between data entities, such as customers and sales data. Improve data-model performance and scaling by pre-aggregating and denormalizing your data. Use change-feed to maintain your data's referential integrity.

Lessons

- Introduction.

- Explore high availability and disaster recovery support of Azure for SAP workloads.

- Explore high availability of SAP workloads.

- Examine failover clustering.

- Explore deployment scenarios.

- Explore high availability of SAP application servers.

- Explore high availability of SAP ASCS-SCS instances.

- Explore SAP HANA availability.

- Explore SQL Server high availability for SAP in Azure.

- Explore Oracle high availability for SAP in Azure.

- Examine high availability capabilities of Azure infrastructure.

- Explore availability zones.

- Knowledge check.

- Summary.

By the end of this module, you'll be able to:

- Manage relationships between data entities by using advanced modeling and partitioning strategies.

- Maintain the referential integrity of your data by using change feed.

- Implement pre-aggregating and denormalizing data strategies to improve data-model performance and scaling.

- Optimizing storage and compute by mixing entity types in a single container.

Replicate data across the globe and manage automatic or manual failovers in Azure Cosmos DB.

Lessons

- Introduction.

- Understand replication.

- Distribute data across regions.

- Evaluate the cost of distributing data globally.

- Define automatic failover policies.

- Perform manual failovers.

- Configure SDK region.

- Exercise: Connect different regions with the Azure Cosmos DB for NoSQL SDK.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Distribute data across global data centers.

- Configure automatic failover and perform a manual failover.

- Configure the Azure Cosmos DB for NoSQL .NET SDK to use a specific region.

Configure consistency on a sliding scale for Azure Cosmos DB for NoSQL.

Lessons

- Introduction.

- Understand consistency models.

- Configure default consistency model in the portal.

- Change consistency model with the SDK.

- Use session tokens.

- Exercise: Configure consistency models in the portal and the Azure Cosmos DB for NoSQL SDK.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Configure default consistency level for an Azure Cosmos DB account.

- Change the consistency level on a per-request basis.

Write data to multiple regions using Azure Cosmos DB for NoSQL.

Lessons

- Introduction.

- Understand multi-region write.

- Configure multi-region support in the SDK.

- Understand conflict resolution policies.

- Create custom conflict resolution policy.

- Exercise: Connect multi-region write account with the Azure Cosmos DB for NoSQL SDK.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Configure Azure Cosmos DB for multi-region write.

- Use the .NET SDK to select a write region for operations.

Tune the indexing policy based on your SQL queries in Azure Cosmos DB for NoSQL.

Lessons

- Introduction.

- Index usage.

- Review read-heavy index patterns

- Review write-heavy index patterns.

- Exercise - Optimize an Azure Cosmos DB for NoSQL container's index policy for common operations.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Customize an indexing policy for read-heavy workloads.

- Customize an indexing policy for write-heavy workloads.

Measure the performance of an indexing policy in Azure Cosmos DB for NoSQL.

Lessons

- Introduction.

- Enable indexing metrics.

- Analyze indexing metrics results.

- Measure query cost.

- Measure point operation cost.

- Exercise - Optimize an Azure Cosmos DB for NoSQL container's index policy for a specific query.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Tune an indexing policy for specific queries.

- Measure the cost for a query or operation.

Implement, configure, and monitor integrated cache in Azure Cosmos DB for NoSQL.

Lessons

- Introduction.

- Review workloads that benefit from the cache.

- Enable integrated cache.

- Configure cache staleness.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Implement the integrated cache.

- Configure integrated cache options.

We learn to use Azure Monitor to create and analyze monitoring data for Azure Cosmos DB

Lessons

- Introduction.

- Understand Azure Monitor.

- Measure throughput.

- Observe rate-limiting events.

- Query logs.

- Exercise: Use Azure Monitor to analyze an Azure Cosmos DB for NoSQL account.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Understand how Azure Cosmos DB uses Azure Monitor to monitor server-side metrics.

- Measure Cosmos DB's throughput.

- Observe rate-limiting events.

- Query telemetry logs.

- Measure cross-partition storage distribution throughput.

We will learn to use a rich set of REST response codes returned by Azure Cosmos DB request to help you analyze potential issues.

Lessons

- Introduction.

- Review common response codes.

- Understand transient errors.

- Review rate-limiting errors.

- Configure Alerts.

- Audit security.

- Exercise: Troubleshoot an application using the Azure Cosmos DB for NoSQL SDK.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Review common response codes.

- Understand transit errors.

- Review rate-limiting errors.

- Configure Alerts.

- Audit Security.

We'll learn to use the two backup models Azure Cosmos DB provides.

Lessons

- Introduction.

- Evaluate periodic backup.

- Configure continuous backup and recovery.

- Perform a point-in-time recovery.

- Exercise - Recover a database or container from a recovery point.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Understand the different backup and restore options Azure Cosmos DB provides.

- Evaluate periodic backups.

- Configure continuous backups.

- Do point in time recovery.

We will learn the different security models that Azure Cosmos DB uses.

Lessons

- Introduction.

- Implement network-level access control.

- Review data encryption options.

- Use role-based access control (RBAC).

- Access account resources using Microsoft Entra ID.

- Understand Always Encrypted.

- Exercise: Store Azure Cosmos DB for NoSQL account keys in Azure Key Vault.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Implement network level access control.

- Review data encryption options.

- Use role-based access control (RBAC).

- Access Account Resources using Microsoft Entra ID.

- Understand Always Encrypted.

Learn how to manage Azure Cosmos DB for NoSQL accounts, databases, and containers using the Azure CLI.

Lessons

- Introduction.

- Create resources.

- Manage index policies.

- Configure database or container-provisioned throughput.

- Migrate between standard and autoscale throughput.

- Change region failover priority.

- Initiate failovers.

- Exercise: Adjust provisioned throughput using an Azure CLI script.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- View arguments, groups, and subgroups for a specific CLI command.

- Create Azure Cosmos DB accounts, databases, and containers using the CLI.

- Manage an indexing policy using the CLI.

- Configure database or container throughput using the CLI.

- Initiate failovers and manage failover regions using the CLI.

Learn about automated Azure Cosmos DB for NoSQL resource deployments using the Azure Resource Manager with JSON and Bicep templates.

Lessons

- Introduction.

- Understand Azure Resource Manager resources.

- Author Azure Resource Manager templates.

- Configure database or container resources.

- Configure throughput with an Azure Resource Manager template.

- Manage index policies through Azure Resource Manager templates.

- Exercise: Create an Azure Cosmos DB for NoSQL container using Azure Resource Manager templates.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Identify the three most common resource types for Azure Cosmos DB for NoSQL accounts.

- Create and deploy a JSON Azure Resource Manager template for an Azure Cosmos DB for NoSQL account, database, or container.

- Create and deploy a Bicep template for an Azure Cosmos DB for NoSQL account, database, or container.

- Manage throughput and index policies using JSON or Bicep templates.

Author stored procedures using JavaScript in Azure Cosmos DB for NoSQL.

Lessons

- Introduction.

- Understand transactions in the context of JavaScript SDK.

- Author Stored procedures.

- Rollback transactions.

- Create stored procedures with the JavaScript SDK.

- Exercise: Create a stored procedure with the Azure portal.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Author stored procedure.

- Rollback stored procedure transaction.

Author user-defined functions and triggers using JavaScript in Azure Cosmos DB for NoSQL.

Lessons

- Introduction.

- Create user-defined functions.

- Create user-defined functions with the SDK.

- Add triggers to an operation.

- Create and use triggers with the SDK.

- Exercise: Implement and use user defined functions with the Azure Cosmos DB SDK.

- Knowledge check.

- Summary.

By the end of this module, you’ll be able to:

- Create user-defined functions.

- Create triggers.