liveBook · Manning

Database

As explained in Microsoft Azure in Action

A database is an organized logical store within a Cosmos DB account that contains collections or containers of data.

A database is an organized logical store inside a Cosmos DB account. It sits between the account and the containers or collections that hold documents—rather like an apartment building’s address book, but with fewer elevators. section 11.1

In Cosmos DB’s MongoDB context, a database groups collections under one account. A MongoDB collection acts as the container that stores data, while documents are the records inside it. section 11.1

Database choices serve different application needs:

  • Relational databases organize structured data for retrieval, manipulation, and analysis, with Azure SQL Database, Azure Database for MySQL, and Azure Database for PostgreSQL among the available options. section 10.0 section 10.3
  • Cloud database designs also require attention to performance, cost, disaster recovery, security, encryption, access control, and auditing. section 10.1

Creating a Cosmos DB database

After creating the alpacacosmosdbaccount Cosmos DB account, create a MongoDB database named alpacacosmosdb with the Azure CLI. Then create a collection such as alpacacontainer beneath it; that collection serves as the database’s container. section 11.1

Figure 11.1 A Cosmos DB account holds databases, which in turn has containers that hold documents.

Use the hierarchy diagram to see how a Cosmos DB account contains databases, which contain containers, which hold documents. section 11.1

How Microsoft Azure in Action covers it

How deep it goes
Defines the account-database-container-document hierarchy and demonstrates database creation, but defers broader Cosmos DB scaling details.
Examples
Uses alpacacosmosdbaccount, alpacacosmosdb, and alpacacontainer in Azure CLI commands and a hierarchy diagram.
What it assumes
Assumes familiarity with an Azure account and introduces the account-database-container-document relationship during setup.
What you can do after
Operate/configure a MongoDB database and collection under a Cosmos DB account using Azure CLI.
How it connects
Connects databases with Cosmos DB accounts, containers, collections, documents, MongoDB, and relational database services.

Also explained in

Compare how 24 books explain database →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microsoft Azure in Action. The section links point to the parts of the book it draws on.