Azure Cosmos DB is a No SQL database and is an expansion of Document DB features. In a few words with Cosmos DB, you can handle your data using document (JSON), key-value and graph database globally.
Benefits of Cosmos DB
|Scalability||Horizontal scale – out, easy way to reduce capacity quickly|
|Performance||Enterprises can increase performance NoSQL database by adding resources.|
|High Availability||NoSQL are by design high available databases, without the complexity|
|Global Availability||By automatically replicating data across multiple servers, this minimize latency and ensure consistent application experience.|
|Flexible Data Modelling||Developers can leverage the data types and query options that are most fit to their application. It offers a more agile development.|
Deploy your first Azure Cosmos DB
Create your first collection
In this step, from the Main blade, you can select Quick Start to create your first data collection. As you can see in the following image there are a lot of blends in platforms, such as .Net, Xamarin, Python, etc.
Add a collection
Let’s say that you are a .Net developer, you have to select tab – [.NET] and click [Create ‘Items’ collection].
Download and run your .NET app
On the second step you can Download and run the .NET app from Visual Studio. So, click [download] to get the project on your computer.
When you unzip the files you can see one folder src = Source Code and one file todo.sln = Solution File.
Open solution using Visual Studio
When you open solution for first time, it’s good to Rebuild first the code, from the Build – Rebuild Solution.
To see if the app is working click the button Google Chrome to run the Web App.
And, finally, it works.
Working with data
At the final step, you can see how data manipulation works. Click [Open Data Explorer] button
Add a New Document
After, Data Explorer opens, you can create a new document
The document structure will be as follows :
Configure Scale & Settings
On Scale you can change the Throughput, by default is 400 you can increase or reduce that number, at the same time you can see the estimated spend in USD.
On Settings, there is a Time to Live to set which impact query results while the index transformation occurs. See, more details here.
|Learn about Azure Cosmos DB migration tool, in this article.|