Live data from Hacker News

Show HN: SQL to Mongo Query Translator

querymongo.com

21–30 of 34 posts

Re: Show HN: SQL to Mongo Query Translator

#22
post #15

I don't have any experience with MongoDB, but the example put me off using it completely. The MySQL query is concise and brief, the MongoDB equivalent is bloated. Only after several seconds I was able to deduce that the MongoDB query probably does something more than MySQL query. Can you please make the examples more comparable? Or did I misunderstand the MongonDB and it actually is so bloated by design? I believe it…

MongoDB's query language is just not very good.

Used to make me want to tear my hair out... But I've moved to using linqpad and writing the queries in linq now, and it's not too bad.

http://stackoverflow.com/questions/7303333/are-adhoc-queries...

Re: Show HN: SQL to Mongo Query Translator

#24
post #7

The default query already filled in is translating to the use of a Group function, which is a very bad idea. While not deprecated per se, its use is discouraged. Group does not function in Sharding mode at all , it also takes a lock on the JavaScript interpreter making it non-parallelizable. Map/Reduce is somewhat better in that it is shardable, and with V8 likely in the next stable release, will have better parallel…

You're correct, however note that 2.3/2.4 fixes the lock on the javascript interpreter with the move to V8 as the default engine.

Re: Show HN: SQL to Mongo Query Translator

#28
post #18

I've also found this diagram incredibly helpful translating from a SQL to map/reduce world. http://rickosborne.org/blog/2010/02/infographic-migrating-fr...

Thanks @gry, and here is the direct link to the PDF: http://rickosborne.org/download/SQL-to-MongoDB.pdf

Re: Show HN: SQL to Mongo Query Translator

#29
post #6

Not particularly useful, I tried a simple join and I got this error message: Failure parsing MySQL query: Unable to convert queries based on more than one table

Sorry about that! Built this in a hackathon and this first version doesn't support joins yet.

If you built all this in a Hackathon then I'm impressed - well done!
Post reply on HN