现在的位置: 首页 > 综合 > 正文

Translate SQL to MongoDB MapReduce

2013年02月16日 ⁄ 综合 ⁄ 共 1659字 ⁄ 字号 评论关闭

I keep hearing people complaining that MapReduce is not as easy as SQL. But
there are others saying SQL is not easy to grok. I’ll keep myself away from this
possible flame war and just point you out to this ☞ SQL to
MongoDB translation PDF

put together by Rick Osborne and also his ☞ post
providing some
more details.

 

图片来源:http://huoding.com/wp-content/uploads/2011/03/SQL-to-MongoDB.png

 

As regards the SQL and MapReduce comparison, here’s what Rick has to say:

It seems kindof silly to go through all this, right? SQL does all of this,
but with much less complexity. However, this approach has some huge advantages
over SQL:

  1. Programmers who don’t know SQL or relational theory may find it easier to
    understand and get using quickly. (Newbies especially, such as my
    students.)
  2. The map and reduce functions can be heavily parallelized on commodity
    hardware.

It’s really that second one that is the key.

I’d also like to share something that I’ve learned lately: SQL parallel
execution is supported in different forms by some RDBMS. So at the end of the
day, it will probably become just a matter of what fits better the problem and
your team.

 

文章来源:http://nosql.mypopescu.com/post/392418792/translate-sql-to-mongodb-mapreduce

推荐阅读:http://rickosborne.org/blog/2010/02/playing-around-with-mongodb-and-mapreduce-functions/

               http://blog.boxedice.com/2010/06/21/map-reduce-and-mongodb/ 
(通过MapReduce实现group操作)

               http://kylebanker.com/blog/2009/12/mongodb-map-reduce-basics/
(非常适合入门,介绍map/reduce方法)

               http://blog.mongovue.com/2010/11/03/yet-another-mongodb-map-reduce-tutorial/
(sql到MapReduce)

               http://blog.evilmonkeylabs.com/2011/01/27/MongoDB-1_8-MapReduce/
(javascript 实现MapReduce)

               http://blog.evilmonkeylabs.com/2011/02/28/MongoDB-1_8-MR-Java/
(java实现MapReduce,其实map, reduce, finalize函数还是javascript实现的)

抱歉!评论已关闭.