Day 1: CRUD and Nesting

We’ll spend today working on some CRUD operations and finish up with performing nested queries in MongoDB. As usual, we won’t walk you through the installation steps, but if you visit the Mongo website,[37] you can download a build for your OS or find instructions on how to build from source. If you have OS X, we recommend installing via Homebrew (brew install mongodb). If you use some Debian/Ubuntu variant, try Mongodb.org’s own apt-get package.

To prevent typos, Mongo requires you to first create the directory where mongod will store its data. A common location is /data/db. Ensure the user you run the server under has permission to read and write to this directory. If it’s not already running, you can fire up the ...

Get Seven Databases in Seven Weeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.