Modules / Database / NoSQL Lab

What are Non Relational Databases?

The same data, stored four different ways. Compare documents, key-value pairs, wide columns and graphs against the relational original — and see what each model makes easy and what it makes painful.

Overview

Document databases store records as documents, often with nested fields. Key-value stores retrieve values by a key. Wide-column systems organize data into column families for distributed workloads. Graph databases represent entities and relationships for traversal.

Several families, not one model

These models make different operations convenient; none is best for every workload. Some products combine multiple models or support SQL-like queries, transactions, and schemas. “NoSQL” does not mean that a database has no query language or no structure.

Schema flexibility still needs a contract

A flexible storage format can make new fields easier to add, but the application still needs to agree on required fields, types, and meanings. Without validation, records written by different versions of a service may disagree in ways that break readers.

Document models can embed related values to make common reads efficient, but duplication and unbounded growth complicate updates. Graph models support relationship traversal, but a relational database can also represent relationships. See document models and rows and key-value and graph models.

Choose from access and consistency needs

Write down the queries, update patterns, consistency expectations, growth, and operational skills required. Compare those needs against a relational design before choosing a specialized store. A multi-database architecture also needs clear ownership of each fact and a way to handle partial failure across stores.

Compare the same application question

For an order history page, ask whether the application needs whole order documents, joins to shared product records, or several query patterns across customers and dates. A document layout may simplify fetching a bounded order with its lines; a relational design may make cross-order analysis and foreign-key constraints easier. A graph store is relevant when traversing relationships is central, not just because records refer to each other. Compare realistic reads, writes, consistency, and operational cost using the same example data.

Plan for consistency across stores

When an application writes the same fact to a relational database and a cache or search index, those writes are not automatically one atomic transaction. A crash between them can leave the copies inconsistent. Decide which store is authoritative, how changes are propagated, how consumers detect lag, and how a failed update is retried. The operational cost of synchronizing two models can outweigh the query benefit. Start with one system when it meets the workload, then add another only for a measured need.

Further reading

Predict, then reveal

About to run: press Add field to one record. Before it does — what happens to the readout?

Committing to an answer first is the point — the reveal runs the experiment on the visualisation above and reads the real value back, so nothing here is scripted.

Recall check

0 of 3

Say the answer out loud before you reveal it — recalling it is what makes it stick, and rereading it is not.

  1. What does this module say about “Several families, not one model”?

  2. What does this module say about “Schema flexibility still needs a contract”?

  3. What does this module say about “Choose from access and consistency needs”?

Cheat sheet

What are Non Relational Databases?

Compare document, key-value, wide-column and graph databases and see which relational guarantee each one drops to gain something else.

DATABASE · vizlearn.in/database/what_are_non_relational_databases.html

About the author

Ashish Jangra builds and maintains VizLearn. Every module here is written and the visualisation behind it hand-built, so the numbers in a readout come from the same code that draws the picture. Corrections are genuinely welcome and get priority over everything else — if a page states something wrong, or an animation misrepresents what the algorithm does, get in touch.