Saturday, November 17, 2018
Cosmos DB Multi Model Feature
Multi Model API feature is one of the key features of Cosmos DB. But what does it really mean? Why a database engine needs multiple models? To answer these questions, Lets use SQL Server as an example. If you want to use SQL Server as your database you must know T-SQL. That's the way you are able to communicate to SQL Database engine. Until the version 2016, you used to have only one data model option in SQL Server. Graph Database model is introduced in SQL Server 2017. You still use the T-SQL for Graph Database but the model you create with Graph Database is different than regular Relation Database model.
Cosmos DB is non-relational database and it stores data in JSON format in its database engine. Unlike SQL Server, Cosmos DB gives you options when it comes to communicate to its database engine.
I speak about Cosmos DB and in my talks, I use racing car to explain Cosmos DB Multi Model APIs. F1 racing cars have very powerful engines, If F1 team wants to win a race, they need to customize the car perfectly for the track and the driver. Cosmos DB is like a F1 car, It has a powerful engine and you can customize it very easily for your application and your developers.
There are many ways to reach the data in Cosmos DB engine. You can use SQL, Mongo, Cassandra, Graph, Table API. These model APIs are like the steering wheel of the F1 cars. Engineers customize the F1 racing cars by programming the steering wheel. All driver has to do is, take the steering wheel and use it. If you are a developer who is expert about MongoDB, you can use the Mongo DB API and use Cosmos DB. If you are expert with SQL, you can use the SQL API. I am sure you get the idea. Cosmos DB Engine doesn't change because of your API choice. It's the same engine, Cosmos DB gives you option to control the engine the way you like by giving you different ways to communicate its engine.
No comments:
Post a Comment