AdvancedTopic 79 of 104Software & Computing

NoSQL databases

Document, key-value, column and graph stores scale flexibly.

In depth

NoSQL stores trade strict relational structure for scale and flexibility: key-value (Redis), document (MongoDB), column-family (Cassandra), graph (Neo4j). Often eventually consistent and horizontally scalable. Choose by access patterns and consistency needs, not hype.

Key points

  • Schema-on-read
  • Sharding
  • Polyglot persistence
Example

A session store uses Redis for fast key-value access.

Why it matters

NoSQL databases handle flexible data and very large scale with different trade-offs, so they are chosen for specific workloads.

Where this is used

  • Storing user profiles as documents with varying fields.
  • Caching session data in a key-value store.
  • Modelling a social graph with a graph database.

Frequently asked questions

What is NoSQL databases?

Document, key-value, column and graph stores scale flexibly.

Why is it important to understand noSQL databases?

NoSQL databases handle flexible data and very large scale with different trade-offs, so they are chosen for specific workloads.

When should I choose NoSQL?

When the data is flexible in shape, the access patterns are simple and key-based, or horizontal scaling across many machines is essential.

Do NoSQL systems give up consistency?

Many offer weaker consistency by default or allow tuning it, so the guarantees must be checked for each system.

How is NoSQL databases used in practice?

Typical applications include storing user profiles as documents with varying fields, caching session data in a key-value store and modelling a social graph with a graph database.

What should I learn before NoSQL databases?

Study "Indexing" first (topic 78 of 104 in Software & Computing). It covers the groundwork this topic builds on.

What are the key points of NoSQL databases?

Schema-on-read. Sharding. Polyglot persistence.

Can you give an example of NoSQL databases?

A session store uses Redis for fast key-value access.

What comes after NoSQL databases?

The next topic is "CAP theorem", which builds directly on this one.

How difficult is NoSQL databases?

It is classed as Advanced in Software & Computing (topic 79 of 104). It is an advanced topic. It assumes you are comfortable with the intermediate topics in Software & Computing.

Learning path

Want to practise? Open the interactive course for quick checks, quizzes, simulations and progress tracking.

Related topics