SQL vs. NoSQL Illustrated
Wed Aug 4, 2021 · 223 words · 2 min

So I made this as part of a talk I gave at work, and thought it might be useful to someone else.

An abstract representation of SQL vs. NoSQL databases

(You can right-click on the image to download it or open it in a new tab. It is the source SVG.)

Description

The idea is that in a NoSQL | Non-Structured | Non-Relational | Schemaless database like MongoDB you are free to put anything you want in your documents.

So, conceptually, they are like bags hooked by their ID (or other indexes), whereas a common SQL database looks more like shelves with dedicated slots where you can only put a given type of data. (Concretely: float, int, string, etc.)

I think the bag analogy also gives a nice sense of why querying or sorting on non-indexed fields in MongoDB can be quite expensive (you have to rummage all the bags).

License

This illustration is CC-BY Thibault Lemaire, made with Inkscape from the following public domain resources:


Games · Blog · About · home