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.
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