10 Global databases with Cosmos DB

 

Data. You can’t get by without it. Almost every application that you build and run creates, processes, or retrieves data. Traditionally, this data has been stored in a structured database such as MySQL, Microsoft SQL, or PostgreSQL. These large, structured databases are established and well known, have ample documentation and tutorials, and can be accessed from most major programming languages.

With great power comes great responsibility, and a lot of infrastructure overhead and management typically go with these traditional structured databases. That’s not to say you shouldn’t use them--far from it--but when it comes to applications that run on a global scale, it’s no easy feat to also build clusters of database servers that replicate your data and intelligently route customers to your closest instance.

That’s where Azure Cosmos DB becomes your best friend. You don’t need to worry about how to replicate your data, ensure consistency, and distribute customer requests. Instead, you add data in one of the many models available, and then choose where you want your data to be available. In this chapter, you’ll learn about unstructured database models in Cosmos DB, how to create and configure your database for global distribution, and how to build web applications that use your highly redundant and scalable Cosmos DB instance.

10.1 What is Cosmos DB?

10.1.1 Structured (SQL) databases

10.1.2 Unstructured (NoSQL) databases

10.1.3 Scaling databases

10.1.4 Bringing it all together with Cosmos DB

10.2 Creating a Cosmos DB account and database

10.2.1 Creating and populating a Cosmos DB database

10.2.2 Adding global redundancy to a Cosmos DB database

10.3 Accessing globally distributed data

10.4 Lab: Deploying a web app that uses Cosmos DB