NoSQL - robbiehume/CS-Notes GitHub Wiki

Overview

  • NoSQL is basically a key-value storage
    • The value can be any kind of object: number, string, JSON
  • Different types: Cassandra, DynamoDB, Riak

Use NoSQL when:

  • Scalability and high availability matter (e.g., real-time apps, IoT)
  • Data is semi-structured or schema is flexible
  • You need fast, distributed storage (e.g., caching, big data)

Strengths

  • They're flexible and simpler to setup because they don't support table relationships
  • Better for storing unstructured data
    • Because of this, they can also shard this data across different data stores, allowing for distributed databases

Weaknesses

  • For write heavy systems, even with shading (peer-to-peer replication) there can be loss of consistency
  • This can lead to accessing stale data, known as eventual consistency
  • This is only really an issue where every millisecond matters, like in banking