The data model of NoSQL
NoSQL emerged to solve the problem of the difficulty of running SQL on a cluster. i.e. scaling out. This leads me to think that if you can handle the amount of data, Big Data, in a single SQL box, you may not need NoSQL.
Most NoSQL, as described below as type 1 to 3, is an aggregate-oriented data model, which is beneficial when running on a cluster.
NoSQL types
- Key-Value: Have metadata. e.g. Redis.
- Document: id is a key. e.g. MongoDB
- Column family: Cassandra
- Graph: Good for complex relationships. It’s ACID( atomicity, consistency, isolation, durability).
All NoSQL is schemaless.
Consistency VS Availability. It’s a business choice.
When to use NoSQL
- Big Data: NoSQL can run on a cluster.
- Easy to develop: When the data model is a naturally aggregate model, NoSQL fits better than SQL.
Reference: GOTO 2012 • Introduction to NoSQL • Martin Fowler