Today I’d like to walk through the multi model database portion of Cosmos DB and explain what multi model means to you. Multi model database service means that your data can be stored a number of different ways. Currently, Cosmos DB stores 4 different types of data and it allows you to integrate with an API and build out a user experience around these database storage types.
Let’s take a look at the models of storage with Cosmos DB:
1. Document DB or Mongo DB – Both work with document databases. A SQL API works with document DB protocols. The Mongo DB works with Mongo APIs. We store the data in a JSON (or similar) format and either of those APIs allow you to interact with those documents in the database. It’s easiest to use a SQL API if you’re starting from scratch, as it’s the most native version of working with Cosmos.
If you have a Mongo database solution and you want to look at making it globally aware or scaling it out, you can move it directly into Cosmos DB and use a Mongo DB API to interact with that data.
2. Graph Database – Similar to what you use with Facebook to understand how the data is related and works together. Microsoft has chosen to use the Gremlin API from Apache TinkerPop. So, they’re using an open source API that already exists, enabling you to interact with a graph database globally scaled with all the Cosmos features in Apache.
3. Key Value Pair – Another way to store your data with the key and values associated with that. This solution is supported on the standard Azure table API, which follows the same schema and design as Azure table storage.
4. Wide Column or Column Family – In this scenario, Microsoft leverages the Cassandra API. If you have Cassandra implementation, you can move that to Cosmos DB and use the wide column format that is used in Cassandra.
Keep in mind, choosing the API is not the end all. The data is stored there, so the APIs give you the chance to pick and choose how you interact with the data and how that data is optimized in the database on the back end. If you have workloads that work around one of these models, it’s a great option to look at as you move forward in your Azure journey.
Need further help? Our expert team and solution offerings can help your business with any Azure product or service, including Managed Services offerings. Contact us at 888-8AZURE or [email protected].