NoSQL
Why NoSQL
- If the data to be stored is unstructured
- If there's a need to serialise and deserialise data
- If the size of the data to be stored is large
- Favour eventual consistency
- limited by the scale
BASE
- Basically available - the system guarantees availability.
- Soft state - the state of the system may change over time, even without input.
- Eventual consistency - the system will become consistent over a period of time, given that the system doesn't receive input during that period.
Key-Value store
- Redis, DynamoDB
- For rapidly changing data
- Just like an hash-map
- flat in nature
- used for session oriented applications
- Maintain keys in lexicographic order, allowing efficient retrieval of key ranges.
Document Store
- MongoDB
- For high flexibility, and occasionally changing data
- such in JSON, XML, binary formate
- key points to a hierarchical structure
- unstructured catalog data
- Provides APIs or a query language to query based on internal structure of the document itself
Wide Column Store
- Cassandra, Bigtable
- high availability and high scalability
- for large volume of write
- don't need to update and read a lot
Graph database
- network structure such as social media networks
- social applications
- Most can only access with REST APIs