InfoGraphic: Migrating from SQL to MapReduce with MongoDB

As a sort of follow-up to yesterday’s post, I’ve prepared a PDF infographic of how the clauses in a moderately-complex SQL statement relate/translate to the JavaScript of MapReduce functionality in MongoDB. Clickity-click for the larger, printable PDF version (188KB).

Infographic visualizing the relationship between SQL and MapReduce on MongoDB

Published by

Rick Osborne

I am a web geek who has been doing this sort of thing entirely too long. I rant, I muse, I whine. That is, I am not at all atypical for my breed.

7 thoughts on “InfoGraphic: Migrating from SQL to MapReduce with MongoDB”

  1. This is a really cool graphic – thanks for sharing it!

    Just as a note to any readers – M/R in MongoDB is intended as an aggregation / ETL mechanism, not as a general purpose query mechanism. So for simpler queries you’ll just use a filter (like note 5 in the diagram) – those will leverage an index and be more real-time.

  2. I appreciate your help in debugging the graphic, and you make a good point — most queries probably won’t need to use M/R. I wanted to make a reasonably complex query that used as many of the standard SQL clauses as I could, so that I could refer back to this down the road when I can’t remember how HAVING or AVGs worked.

    And I have to figure … to some of my students, the JavaScript nature of MongoDB is going to make more sense than SQL. But since the focus of the class is relational databases and SQL, this is a sort of Rosetta Stone to get from one to the other.

    I really hope to have a sharding example worked out before my next class. I think it’d be awesome to have a classroom full of students split up a good sized dataset (say, the Netflix data) and have them see how distributed queries work.

Comments are closed.