MongoDB Notes – Some basic Stuff

10gen education mongodb

This is not a mongoDB Tutorial. Its some of my notes, derived from taking the M101 mongoDB for developers class by 10gen Education. Trying to keep it as compact as possible. So this is not the place to learn mongoDB. At least one person finds this useful.

OS Shell:

Importing from a json export.

-d sets the db
-c sets the collection

Running mongo shell with a script.

loads the script in the “shop” database context.

Monitoring your instances:

There are some pretty cool utilities that come with Mongo for monitoring your instances.
mongotop – shows how much time was spend reading or writing each collection over the last second
mongostat – brilliant live debug tool, gives a view on all your connected MongoDB instances
MongoDB Monitoring Service – 10gen’s hosted mongo monitoring service. Good starting point.

GUI management Tools:

Robomongo – Shell-centric MongoDB management tool

mongoDB shell, usefull commands:

mongoDB Shell, basic commands for CRUD operations:

Hopefully I’ll find the time to post more advanced stuff!