Building MongoDB find() Queries


A MongoDB database stores data in collections. Each collection contains a set of related documents that are used by one or more applications to carry out their operations.

The applications—as well as individuals managing the collections—must be able to query the data as efficiently as possible to ensure that the appropriate information is available whenever it is needed.

The better you understand how to build queries, the more effectively you can access MongoDB data and provide your applications with the information they need to support their operations.

Studio 3T offers several tools for quickly and easily creating both simple and complex queries. At the heart of these tools is the find method, a mongo shell command for retrieving data from a database collection.

In this section of the course, you’ll learn how to build mongo shell statements that incorporate the find method in order to retrieve data from the customers collection, which you imported in the first section of this course.

To help you understand how the find method works, you’ll build several queries in IntelliShell, and then you’ll use Visual Query Builder to create the same queries, taking advantage of the tool’s graphical features to construct each query element.

By the end of this section, you will learn how to:

  • Use IntelliShell to build and run mongo shell find statements
  • Use Visual Query Builder to build and run mongo shell find statements
  • Use Query Code and IntelliShell to modify and run a mongo shell find statement

What you will need:

  • Access to a MongoDB Atlas cluster
  • Access to the customers collection in the sales database
Log in

Log in to your Studio 3T Academy account

Forgot password?

Don't have an account yet? Sign up
Sign up

Start learning MongoDB today. All fields are mandatory.

By signing up for a course, you agree to the 3T Software Labs Privacy Policy.

Already have an account? Log in