11

I am working with a third client that will be using both a SQL and NoSQL solution (often SQL Server and Mongo). The last two clients I worked with understood a great deal of technical information, so phrases like relational database or document storage made sense to them. I tend to use bank processing as a SQL example and blogging storage as a NoSQL example, which - up to this point - have made sense to my clients. When clients think of examples like transactions and "live feeds" that can be hundreds of thousands of characters, they can sometimes prefer both solutions.

This other client, who's brilliant in his business, doesn't have that technical edge (he's an outstanding charismatic leader, so in no way shape or form am I disparaging him, as we all have our strengths). I'm curious if anyone here has had to explain these database concepts to people unfamiliar with them from a technical angle and what analogies you used to explain how each process works separately and how they would work together?

1
  • 1
    I wouldn't try to explain the differences with an analogy because at the end of the day one will do the job better. Instead I would cover the business impacts of ACID vs. BASE: johndcook.com/blog/2009/07/06/brewer-cap-theorem-base That is what I would imagine the client would be most interested in. For example, "Am I ok with my data being eventually the same?"
    – ryan1234
    Jan 21, 2013 at 3:07

2 Answers 2

21

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.

1
  • 1
    I really like this analogy - I think anyone can relate to it. As I've seen this trend arise where people are using a combination of technologies, this also demonstrates why both can be useful.
    – Kprof
    Jan 21, 2013 at 12:52
6

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.