Make MongoDB work just like Postgresql does...

Turns out a lot of the changes for MongoDB are the same as Postgresql changes.  Enjoy!