Azure Cosmos DB Database Models

In the previous post, we discussed about the main features of Cosmos DB. In this post, we look at the data storage models supported by Cosmos DB in a bit more detail.

Key-value: As the name suggests, data is stored as a tuple(pair), with a unique attribute(key) mapped to its corresponding content (value). Most Key value store databases use JSON (JavaScript Objet Notification) format to implement key value pairs. Examples of Key-value store databases: Redis, Riak, Berkeley DB, Couchbase and MemcacheDB

Column Family or Columnar: In this type of data model, data is stored in groups of column families that are accessed together. It is a form of Key-value pair, where the key is mapped to a value that is set to a group of columns. Examples: HBase, Cassandra, Amazon DynamoDB and Google BigTable

Document: Document data model allows data to be stored and queried from a key-value pair based JSON style document. Document databases extend the functionality of JSON and enable users to create flexible schemas. E.g. an online marketplace can have thousands of products with different attributes, rather than creating a sparate table for each product, it is easier to create one document with all the product attributes using separate blocks in the document for each product. Examples: MongoDB, CouchDB, IBM Domino and DocumentDB (the precursor to Azure Cosmos DB).

Graph: Data is stored in terms of entities and relationships. It enables creation of a map or network of connections between entities. Graph databases are vey useful when it comes to modeling social networking scenarios. Examples: Neo4j, OrientDB, and FlockDB

One thought on “Azure Cosmos DB Database Models

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: