Using the MongoDB Shell

This chapter covers how to use the mongo (https://docs.mongodb.com/manual/reference/program/mongo/#bin.mongo) command shell to perform simple CRUD (Create, Read, Update, and Delete) operations on the database. In addition, you'll learn how to customize the shell and run scripts directly from the command line. This chapter will be of critical interest to DBAs (database admins), but also developers and IT professionals who want to know what is possible.

The topics that we will learn in this chapter are:

  • Overview
  • Performing Simple Queries
  • Database and Collection Operations
  • Creating, Updating, or Deleting Documents
  • Creating and Running Shell Scripts

Get MongoDB 4 Quick Start Guide 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.