SQL and NoSQL Analogy for the Non-Technical [closed] SQL and NoSQL Analogy for the Non-Technical [closed] sql sql

SQL and NoSQL Analogy for the Non-Technical [closed]


NoSQL (or schemaless, or document-store, or what-have-you) databases store information like you would recipes in a book. When you want to know how to make a cake, you go to that recipe, and all of the information about how to make that cake (ingredients, preparation, mixing, baking, finishing, etc.) are all on that one page.

SQL is like shopping for the ingredients for the recipe. In order to get all of your ingredients into your cart, you have to go to many different aisles to get each ingredient. When you are done shopping, your grocery cart will be full of all of the ingredients you had to run around and collect.

Wouldn't it be nicer if there was a store was organized by recipe, so you could go to one place in the store and grab everything you need from that one spot? Granted you'll find ingredients like eggs in 50 different places, so there's a bit of overhead when stocking the shelves, but from a consumer standpoint it was much easier/faster to find what they were looking for.


There is no such thing as noSQL. There is only a whole bunch of new database technologies with completely different philosophies and use-cases, and all they have in common are things they also have in common with SQL databases. But when what you really mean to ask is "how can I explain a heterogeneous storage strategy to a non-technical person", I would use the office metaphor.

Your office is full of sheets of paper with different kinds of information. But you don't store it all in the same way:

  • Some is stored in your file cabinet
  • Some is laying around on your desk
  • Some is pinned to your pin board

Why do you do that? Because each kind of information has different access characteristics. Your pinboard is full of data you need quick access to (like memcached). Your cabinet is full of data which you rarely look at or change, but which could become very important sometime in the future. It's also very organized to optimize searching (like a relational database). Your desk is full of data you currently need quick access to. There isn't much order, because a strict order of things on your desk would inhibit your productivity (like a document storage).

Just like you choose a different storage method for each kind of data in your office, we use a different storage method for each kind of information in our computer system.