In this chapter, you learned how to get into the mongo shell using a set of command-line options. You also learned how to use the .mongorc.js file to customize the shell. You learned how to perform basic database operations, such as conducting queries, and inserting, updating, and deleting documents. You learned the basics of how to construct a query filter using query operators, and how to control the output by creating a projection. You also learned that the same filter created for a query can also be applied to update and delete operations. In the process of learning about performing queries, you were shown various examples of common ad hoc reports required by management.
You now know that there is a set of db.collection.XXX shell methods to perform operations on single documents, including findOne(), insertOne(), updateOne(), replaceOne(), and deleteOne(). There is a parallel set of db.collection.XXX shell methods that operate on one or more documents, including find...