Introduction to Cosmos DB
Introduction to Using Cosmos DB
Introduction to Creating an App with Cosmos DB
The course is part of these learning pathsSee 5 more
Cosmos DB is one of many database solutions in a crowded market. From DynamoDB to Cassandra to CockroachDB, the questions one would naturally ask when examining Cosmos DB are, “what makes it special, and how can I get started with it?”
This course answers both of those questions as thoroughly and concisely as possible. This course is for anyone with an interest in database technologies or creating software using Microsoft Azure. Whether you are a DevOps engineer, a database admin, a product manager, or a sales expert, this course will help you learn how to power your technology with one of Azure's most innovative data solutions.
From this course, you will learn how to make use of Cosmos DB's incredible flexibility and performance. This course is made up of nine comprehensive lectures to guide you from the basics to how to create your own app using Cosmos DB.
- Learn the basic components of Cosmos DB
- Learn how to use Cosmos DB via the web portal, libraries, and CLI tools
- Learn how to create an application with Cosmos DB as the data backend
- People looking to build applications using Microsoft Azure
- People interested in database technologies
- General knowledge of IT architecture
- General knowledge of databases
The fact that you're here with me taking this course implies that you know, or at least care a little bit about data based technology. If that's the case, then you know there are a lot of different products out there. There are relational databases like PostgreSQL and MySQL as well. You have no sequel systems like MongoDB or key value stores, collum databases, things like Cassandra, numerous enterprise offerings from big companies. Things like Amazon's DynamoDB. So with such a crowded ecosystem, the first question anyone would rightly ask about Cosmos DB is what makes it so special? Before we try to tackle that question, let's talk a little history.
Cosmos DB is actually an extension of Microsoft's DocumentDB which was released back in 2014. Microsoft had been developing Cosmos DB since 2010 and in 2017, it officially migrated all DocumentDB users to Cosmos DB. Cosmos DB supports the same SQL-like API as DocumentDB as well as several other APIs and features. Now according to Microsoft Azure's own documentation, Cosmos DB is best described as a globally distributed multi-model database. Now the two descriptive terms there are key.
Globally distributed and multi-model, that should already give you an idea of the problems Cosmos DB is meant to solve. For those of you familiar with CAP theory, C-A-P CAP theory, you could infer that availability is one of the chief guarantees. This is critical because achieving reliable database performance across multiple geographic regions is very difficult, especially for relational databases. So what do we mean when we say that Cosmos DB is a multi-model database? When we use the term model when talking about databases, we're referring to how the data is actually stored and what sort of APIs are used for clients to read and write data. So for example, Cassandra has a certain API and storage paradigm that makes it more suitable for some use cases than others. MongoDB and PostgreSQL have their own models. So what does it mean to say that Cosmos DB is multi-model? Well, as you might guess, this simply means that with Cosmos DB, you have the flexibility to use a variety of different APIs for different use cases. In fact, the available models for Cosmos DB come from well known database technologies. Cosmos DB supports Table API, Cassandra, SQL, MongoDB, and Gremlin.
There are STKs available in multiple languages for clients. Cosmos DB is sort of like DynamoDB in that it is a database as a service. That is, you don't install it on your own server and configure it like you would with Cassandra or Postgres. Rather, what you do is you sign up for access through Azure, and behind the scenes Microsoft handles the scaling. Microsoft Azure offers 99.999% uptime SLA to ease concerns about entrusting your precious data to them. Still, it is important to keep in mind the relative lack of control you have if you rely on Cosmos DB. It isn't like a typical database system where you can SSH to the server and tune things the way you want. This is understandably a deal breaker for some people. On the flip side, as a former DynamoDB user, I can say that it can be a really big boon for a small startup to have the reliability and performance guarantees of a large company like Microsoft backing your app.
It lets you focus on your business logic and scale very quickly. So, that's it in a nutshell. Cosmos DB is a powerful database as a service system designed to support a variety of data models and work across multiple geographic regions. In the next lesson, we'll dive into the feature set and talk about how companies actually might use Cosmos DB. See you there.
Jonathan Bethune is a senior technical consultant working with several companies including TopTal, BCG, and Instaclustr. He is an experienced devops specialist, data engineer, and software developer. Jonathan has spent years mastering the art of system automation with a variety of different cloud providers and tools. Before he became an engineer, Jonathan was a musician and teacher in New York City. Jonathan is based in Tokyo where he continues to work in technology and write for various publications in his free time.