Advantages and limitations of key-value databases

NoSQL Concepts

Miriam Antona

Software engineer

Advantages - very simple

  • Key-value tuple
  • No defined schema/types
  • Basic operations:
    • Put
      • inserts a new key-value tuple
      • updates a value if the key already exists
    • Get
      • returns the value by a given key
    • Delete
      • removes a key and its value
  • Fast operations
NoSQL Concepts

Advantages - flexible

  • Allow changes in data types
    • userID:123 = 123456
    • userID:123 = "Miriam"
  • Add additional attributes
    • user:457:preferences = {"language" : "en:US"}
    • user:457:preferences = {"language" : "en:US", "color" : "green","timezone" :"GTM-4"}
NoSQL Concepts

Advantages - information stored in memory

  • Fast reads/writes
  • Can lose data
  • Combination of disk and memory persistence
NoSQL Concepts

Advantages - scalability

  • Can scale horizontally
  • Sharding
    • distributes different parts of the data across multiple servers

Sharding visual explanation. The data is distributed across the servers.

NoSQL Concepts

Advantages - scalability

  • Can scale horizontally
  • Sharding
    • distributes different parts of the data across multiple servers

Sharding visual explanation. The data is distributed across the servers.

NoSQL Concepts

Advantages - scalability

  • Can scale horizontally
  • Sharding
    • distributes different parts of the data across multiple servers

Sharding visual explanation. The data is distributed across the servers.

NoSQL Concepts

Advantages - scalability

  • Can scale horizontally
  • Sharding
    • distributes different parts of the data across multiple servers

Sharding visual explanation. The data is distributed across the servers.

NoSQL Concepts

Limitations

  • Just search by key
    • Problem if we don't know the key
    • Some key-value databases added functionalities
      • search by value
      • add secondary indexes
      • search by several keys simultaneously
    • Not complex queries
NoSQL Concepts

Let's practice!

NoSQL Concepts

Preparing Video For Download...