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
- Use Visual Query Builder to build and run mongo shell
- Use Query Code and IntelliShell to modify and run a mongo shell
What you will need:
- Access to a MongoDB Atlas cluster
- Access to the
customerscollection in the