Azure Cosmos Db
A guide to understanding the Microsoft multi-model database service
During the last few years, there has been a significant change regarding the amount of data produced and consumed by applications, while data-models and schemas are evolving more frequently than they used to.
This is where Azure Cosmos Db, planet-scale NoSQL database as a service comes into the scene. In a nutshell, Azure Cosmos DB, otherwise known as DocumentDB, is fully managed by Microsoft Azure, an incredibly scalable, queryable and last but not least, schema-free JSON document database. Here are the most important features that Azure Cosmos DB offers via the DocumentDB API:
- Elastically scalable throughput and storage
- Multi-region replication
- Ad hoc queries with familiar SQL syntax
- Tunable consistency levels
- Fully managed
- Automatic indexing
Some benefits of Azure Cosmos Db
Cosmos DB enables to build highly responsive and available applications worldwide. It replicates data wherever users are so they can interact with a replica of the data that is closest to them.
This NoSQL database provides 99.999% high availability for both reads and writes. It also provides the ability to programmatically (or via Portal) invoke the regional failover of Cosmos account. This capability helps ensure that the application is designed to failover in the case of a regional disaster.
Cosmos DB guarantees less than 10-ms latencies for both, it also reads (indexed) and writes at the 99th percentile, all around the world. This capability enables sustained ingestion of data and blazing-fast queries for highly responsive apps.
No schema or index management
The database engine is fully schema-agnostic. Since no schema and index management is required, users don’t have to worry about application downtime while migrating schemas. Cosmos DB automatically indexes all data and serves queries fast.
What is a NoSQL Database?
NoSQL (also refers to Not only SQL, non-SQL or non-relational) is a database which gives users a way to manage the data in a non-relational form, it is not structured in a tabular manner and does not possess tabular relationships.
Difference Between SQL And NoSQL databases
|Favor normalized schema.||Favor de-normalized schema.|
|Expensive to scale.||Cheaper to scale when compared to relational databases.|
|Best fit for high transaction-based applications.||Can be used for heavy transactional purposes. However, it is not the best fit for this.|
|They can be vertically scaled by increasing the hardware capacity (CPU, RAM, SSD, etc.) on a single server.||They can be horizontally scaled by adding more servers to the infrastructure to manage a large load.|
|Not suitable for hierarchical data storage.||Suitable for hierarchical data storage and storing large data sets (E.g. Big Data).|
Basically, there are four types of NoSQL databases:
- Column: Wide column stores and arranges the data tables as columns rather than as rows.
- Document: Document databases, aka document stores and keeps the semi-structured data along with its description in the document format.
- Key-value: Key value databases have their data model based on an associative array (map or a dictionary) in which the data has represented a collection of key-value pairs. They are highly suitable for session management and caching in web applications.
- Graph: In graph stores, data is organized as nodes and edges.
The choice of the database depends upon user preferences, business requirements, volume, and a variety of data.
NoSQL databases are gaining popularity these days due to their capacity to integrate big data, low cost, easy scalability, and open source features. However, it is still a relatively young technology and lacks standardization, unlike SQL. Lack of ACID compliance is also a concern with NoSQL.
About this presentation
On September 2019, Cognizant Softvision celebrated the 5th edition of Programmers’ Week, a global event where more than 140 speakers delivered technical-talks from Argentina, US, Canada, India, Ukraine and Romania. One of them was Eduardo Acosta, who is based in Buenos Aires and delivered an internal presentation about Azure Cosmos Db.