I’ve been working with MongoDB for a little over a year now and one of the things that I’ve found that is missing from the community is a really good in depth full coverage cheat sheet for the Mongo shell.
I’ve recently just finished up the Mongo University courses for M101JS: MongoDB for Node.js developers, and M102: MongoDB for DBA’s and I wanted to have a 1 page reference sheet to summarize everything I had learned.
I’ve looked around the web and there are a few but they all are either several pages long which is not a real cheat sheet, its a short tutorial on different commands. I wanted a real cheat sheet. You know the kind that just lists all the API commands in reference format so you can look at it and be reminded of all the different commands and operators available.
So since I couldn’t find one I created one.
It contains everything I could fit on an 11in x 17in page sized for print. But in PDF form it also has every single command hyperlinked to its full documentation page in the MongoDB reference. So for those times when your not sure exactly what the parameters or options for a command are, you can just click the item in the PDF to go straight to the page in the MongoDB reference for full details.
MongoDB Shell Cheat Sheet for MongoDB v2.4
Feel free to leave corrections, comments, or suggestions for updates below. I’m also thinking of making a 2 page 8.5in x 11in version as well if I can make it all fit properly. I don’t think this version would be very legible printed on 8.5×11 scaled down.
33 thoughts on “MongoDB Shell Cheat Sheet for V2.4”
Thanks for creating this cheatsheet, it looks very impressive and useful. Can I ask you how you created this sheet? Thanks again for the effort you put into this!
I created it in Visio 2013 using the UML class modeling template. Each box is a class and each line item is a member of the class that i just wrote the info for and it made it very easy to just snap in new line items for each box and arrange and group them and include separators. I had planned to have arrows to link different parts together but found it wasn’t necessary in the end by dividing the operators up by how they are used.
Wow! Thanks for sharing this. Also, its really very nice that the PDF created with links to MongoDB Manual Pages 🙂
Daniel, superb, many thanks, full five star work!
Awesome work Man!!!
Thanks a lot – they’re great courses on MongoDB University, and it’s nice to have such a useful resource … for next time I take one of their courses … hoping for Ruby+MongoDB …
This is really helpful, Thanks for sharing
Nice pdf that provide fast reference to all command.
Very use full.
Nice work and thanks for sharing.
Thanks for this great document… and for the tip on Visio
Daniel, This is a very cool cheat sheet, thanks for sharing.
Thanks for sharing…very useful!
A great work, Daniel. This is really helpful.
Super kewl…great cheat sheet.
Great work man. 🙂
M101J wiki sent me here. Thank you it seems very useful!
Great work mate. Really helpful 🙂
The M101JS course mentioned your sheet. Great job! This will come in handy.
thanks man… appreciate your work and sharing with the community…:)
Awesome job. Thanks a lot, it’s very useful.
Brilliant, thanks for sharing. New to MongoDB, occasionally use the .forEach() method. Should ‘forEach()’ be listed in the cursors section ??
One of the reasons I chose to leave out forEach() is because it is a fairly standard method for languages or libraries. I had to leave a few things out for space reasons and this was one reason. Another one is that I think when you use forEach() the entire cursor’s results have to be loaded into memory. I could be thinking of toArray() though. I’m not sure.
Thanks for doing and sharing this. It will come in handy for all things Mongo.
Thanks for this Daniel. Sorry to be a pedant, but you have “Geospacial”, the word you want is “Geospatial”. Keep up the good work!
I’ll fix it when I do a 2.6 update.
Thanks alot. realy helpfull
This is really awesome. Many thanks to Daniel.
Hi Daniel, this is extremely helpful. Nice way to create it as well.
I love your MongoDB Shell and I wonder if you are going to update that with MongoDB 2.6. Another tips is perhaps to have two links for more examples, one pointing to MongoDB documentation, and one pointing to a site with more advanced examples.
I do plan to update it for 2.6 eventually. I am in the process of updating our production servers to 2.6 now and am pouring over the enormous changelog to try to integrate the changes.
The is very helpful.