1. Home
  2. Training Library
  3. Microsoft Azure
  4. Courses
  5. Introduction to Azure Storage Solutions

Azure CosmosDB DocumentDB API

The course is part of these learning paths

AZ-203 Exam Preparation: Developing Solutions for Microsoft Azure
course-steps 18 certification 1 lab-steps 7
Getting Started with Azure
course-steps 2 certification 1
Developing, Implementing and Managing Azure Infrastructure
course-steps 10 certification 7 lab-steps 2
more_horiz See 2 more
play-arrow
Start course
Overview
DifficultyIntermediate
Duration1h 13m
Students2124

Description

This course provides an introductory tour of Azure Storage Solutions such as its SQL offerings (SQL DB and third party offerings of MySQL), managed NoSQL databases (DocumentDB and MongoDB), managed Redis Cache service, Azure Backup (backup-as-a-service), Site Recovery (for handling disaster recovery) and StorSimple (a hybrid cloud storage solution).

Target Audience / Experience

  • This course is for developers or IT professionals looking for an introduction to Azure’s Storage Solutions.
  • Some familiarity with the Azure platform is helpful, but not required.

Learning Objectives

  • Understand what SQL DB is and how to get started using it
  • Learn the options offered by Azure for managed MySQL
  • Understand what DocumentDB and MongoDB are and how to get started using them
  • Learn what Redis Cache is and some cases of when you would use it
  • Get an understanding of what Azure Search provides
  • Learn how Azure Backup can solve common backup needs
  • Understand what role Site Recovery can play in disaster recovery
  • Learn how StorSimple can extend your on-premise storage capacity


Outline

  • Course Introduction
    • Overview
  • Azure SQL Database
    • What is Azure SQL Database?
    • Understanding the service tiers
    • Create a SQL Database
    • What is a Data Throughput Unit (DTU)?
    • Scaling Azure SQL
  • MySQL
    • Options for Using MySQL in Azure
  • Azure CosmosDB DocumentDB API
    • What is DocumentDB?
  • Azure CosmosDB MongoDB API
    • Options for Using MongoDB in Azure
    • How does DocumentDB compare to MongoDB?
  • Azure Redis Cache
    • What is Azure Redis Cache?
    • Common scenarios for using Redis Cache
    • Understanding the service tiers
    • How does Redis work?
    • Create and manage a Redis Cache
    • Scaling Azure Redis Cache
  • Azure Search
    • What is Azure Search?
    • Indexes and Search Features
    • How do you use the Search Service?
    • Create a Search Service and Index
  • Azure Backup
    • What is Azure Backup?
    • Backup Scenarios
    • Import/Export Service
    • What is the Import/Export Service?
    • Why would you use Import/Export?
  • Site Recovery
    • What is Site Recovery?
    • Workload recovery scenarios
  • StorSimple
    • What is StorSimple?
    • How does StorSimple work?
  • Course Summary
    • Conclusion and Wrap-Up

Transcript

Welcome back, at this point we've covered some relational databases. Now let’s look at CosmosDB.
 
What is CosmosDB aka DocumentDB?

Well, DocumentDB was rebranded at Build 2017 to CosmosDB.
This rebranding to me is similar to Google’s rebranding to Alphabet. Where DocumentDB is now one of the models of CosmosDB supports.
It’s still the same infrastructure, but its ability to be multi-model and multi-api database is now highlighted more.
CosmosDB currently supports: DocumentDB, MongoDB, Azure Table Storage and Gremlin – which is a graph database.
Ok, now that we’ve mentioned CosmosDB, let’s take a look at the DocumentDB API.

DocumentDB is a NoSQL database that stores JSON documents.
NoSQL refers to there not being a schema enforced by the database, though applications will still typically store documents together that have the same schema.
DocumentDB is provided as a service by Microsoft - which means you don't need to worry about the computing resources and all that infrastructure stuff.
You get to choose the consistency model it will use.
DocumentDB also guarantees low latency, which means 99% of the time your reads should take less than 10 milliseconds and writes should take less than 15 milliseconds.
It has a 99.99% availability SLA, can be geo-replicated and you can increase or decrease your scaling as needed.
 
DocumentDB uses a measure of throughput called a Request Unit to provide predictable performance and scalability.
The measure is 1 RU, so one request unit, equals the resources needed to read a one kilobyte document.
So, since there is some math involved, you’re going to need to do some analysis of your data needs to get an idea of cost ahead of time.
Here are some numbers to help.
The table, shows some operations on a 1KB document and their corresponding RU measurements.
Ok, now you may be wondering, why do you need to understand what request units are?
 
Well, you need to know about request units because that is how you scale your DocumentDB - it is also part of how you get charged.
If you think about it, it is similar to the service tiers in SQL Database, where the DTUs increased with the tiers as did the cost.
Though storage size is broken out with DocumentDB, so you aren't locked into max sizes like you are in SQL Database, which is nice.
To scale your DocumentDB up and down, you just need to reserve more RUs to scale up and less RUs to scale down.
So that is scaling, now let's look at the features of DocumentDB.
 
DocumentDB automatically indexes all the data when it gets ingested, which helps retrieve data faster.
You can also add a time to live on the Collection or on a document, that means a document will get physically deleted when it expires.
And even though DocumentDB is storing JSON documents, you can use SQL to query them.
You even use aggregates in your queries - so get things like the count or average for example.
DocumentDB also gives you the ability to write stored procedures, triggers and user defined functions in javascript that execute on the database - not in your client code.
Ok, so that’s some features of DocumentDB, now let's jump to a demo and take a look at the DocumentDB.
 

About the Author

Students2125
Courses1


Jason Haley is an independent consultant who focuses on Azure and Angular. He has over 20+ years’ experience architecting, designing, developing and delivering software solutions using mostly Microsoft technologies. Jason recently achieved his MCSE: Cloud Platform and Infrastructure certification in May 2017 (by passing all of the 70-532, 70-533 and 70-534 exams). He is also a Microsoft Azure MVP and leads the North Boston Azure User Group. He frequently speaks at community events on topics relating to Azure.