MongoDB Shell Cheat Sheet for V2.4

Standard

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.

Advertisement

33 thoughts on “MongoDB Shell Cheat Sheet for V2.4

  1. Hi Daniel,

    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!

    Erik

    • Daniel H

      Hi Erik,

      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.

  2. Kris

    Wow! Thanks for sharing this. Also, its really very nice that the PDF created with links to MongoDB Manual Pages 🙂
    Thanks!!

  3. Mike BRIGHT

    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 …

  4. johnn888

    Brilliant, thanks for sharing. New to MongoDB, occasionally use the .forEach() method. Should ‘forEach()’ be listed in the cursors section ??

  5. Mike

    Thanks for this Daniel. Sorry to be a pedant, but you have “Geospacial”, the word you want is “Geospatial”. Keep up the good work!

  6. Solveig Løvhaug

    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.

    • Daniel H

      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.

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 )

Connecting to %s