Hearing the Oracle

Home » Big Data » MapReduce – SQL Coding Comparison

MapReduce – SQL Coding Comparison

Here’s something neat! Been wondering what the general differences are with MapReduce coding as compared to SQL queries? Rick Osborne, a Web developer and blogger, has a neat graphic depicting just that. The specific databases he looks at are MySQL and MongoDB. But on the relational database front, the SQL looks to be ANSI, and would be rendered identically in Oracle. And the MapReduce coding is based upon standard, familiar C/Linux syntactic conventions.

                                                                                                         view SQL-to-MongoDB Translation 

The code reordering for the SQL, once translated, is roughly:

         • FROM
         • WHERE
         • SELECT / GROUP BY
         • Aggregate Functions (MIN, mAX, etc.)
         • Report-Wide Aggregates (i.e. AVG)
         • HAVING
         • ORDER BY
         • Final GROUP BY Filtering

The commonly stated view is that one of the drawbacks of NoSQL lies in the complexity of developing new on-the-fly map reductions based on dynamic business needs. Maybe things might really boil down to the relative scarcity of available talent. This recent DICE survey for U.S. software contracts lends credence to that; it rates average compensations for skills like Hadoop and MongoDB tops, over $100K.

~RS

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: