Introduction To Azure Cosmos DB #1
What is Cosmos DB?
Azure Cosmos DB is globally replicated, multimodal database service that offers rich querying over schema-free data.
The definition of Cosmos DB says ‘Globally Replicated’ which means, you can replicate your database in different geographical areas. It stores data in JSON format and there is no need to define the schema in advance hence it is schema free. You can execute the SQL query on stored JSON documents. Cosmos DB was formerly known as Document DB and it supports multimodal like SQL, Table API, Graph API etc.
Azure Cosmos DB is the right solution for web, mobile, gaming applications when predictable throughput, high availability and low latency are key requirements. We will cover throughput, availability, latency in detail in upcoming articles.
Structure of Cosmos DB is similar to RDBMS database. In the first step, we need to create a Cosmos Account. Under the Cosmos account, we can create multiple databases. Each database contains a collection and that collection has JSON formatted documents. This database is like our RDBMS database; Collection is a kind of table, and Document is like a row.
Before we move towards creating Cosmos account, let’s see how one can get access to the portal.
In order to get free access to the portal, please go through the below steps:
Click on ‘Start free’ button.
Enter Microsoft email address and press the ‘Next’ button.
Enter your desired password and click on the ‘Next’ button.
For mobile verification, Microsoft will send a verification code to your mobile number. Just enter the mobile number to receive a verification code and click on the ‘Send Code’ button.
Enter code which you received on given mobile number and click on ‘Next’ button.
Click on ‘Yes’ button to stay signed in.
In order to sign up for the Microsoft Azure account, we need to provide personal information as well as credit card information. Note that Microsoft will not charge for 30 days, so you can discontinue before that.
Provide your personal information and click on ‘Next’ button
Enter your mobile number for verification and select any of the options; i.e. Text or Call for verification.
Enter the verification code, received on the mentioned mobile number and click on ‘Verify Code’ button.
Provide your credit card information and click on the ‘Next’ button.
You are signed up with Microsoft Azure free account for 30 days. Now let’s login through the Azure portal
Enter Microsoft email address and password and click on ‘Sign in’ button
You will be landed on the Azure Dashboard where on the left side, you can see all Azure Services. Now click on ‘Azure Cosmos DB’ service and you can see a list of Azure COSMOS DB accounts. As we are using this service for the first time and we haven’t created any COSMOS DB account, it shows ‘Create Azure Cosmos DB account’ button.
Click on ‘Create Azure Cosmos DB account’ button and fill the required details to create an account.
- ID – ID will be used to connect cosmos db later point in time
- API – We will start with SQL API, so select SQL as API
- Subscription – Select your existing subscription
- Resource Group – If you have created already then use it or you can create a new one
- Location – Select your location, here for the demo I have selected ‘Central India’
Check ‘Pin to dashboard’ checkbox for easy accessibility and click on ‘Create’ button.
On the dashboard, we can see our recently created Cosmos DB account i.e. ‘utilitybillpayments’.
In this article, we have seen a basic introduction to COSMOS DB and Azure free account sign up as well as we created a Cosmos DB account. Go through the next part to see how we can quick-start with Cosmos DB.