chapter two

2 Getting started with Atlas and MongoDB data

 

This chapter covers

  • Discovering the Atlas Platform and Its Command Line Interface
  • Loading a sample data set into your MongoDB Atlas cluster
  • Getting started with the MongoDB shell (mongosh)
  • Managing data with databases, collections, and documents
  • Examining time series and capped collections

In this chapter, we will take our first steps with MongoDB Atlas and delve into data management within a MongoDB deployment. We will explore the concepts, features, and techniques for storing data in MongoDB.

A more comprehensive understanding of MongoDB Atlas will be provided in the second part of this book. For now, our focus is on taking the first steps to build the first MongoDB Atlas cluster using the Atlas CLI. Building this cluster is essential as it allows us to conduct practical exercises and gain a deeper understanding of MongoDB concepts, providing a hands-on experience that illustrates the platform’s capabilities and benefits in real-world applications.

2.1 Setting up Your First Atlas cluster using Atlas CLI

The quickest approach to establish a MongoDB Atlas database cluster is by leveraging the Atlas Command Line Interface (CLI). This CLI, designed specifically for MongoDB Atlas, enables programmatic interaction with the Atlas platform, including features like Atlas Search or Vector Search, right from the terminal. It uses concise, intuitive commands, permitting the execution of database management operations in mere seconds.

2.1.1 Installing the Atlas CLI

2.1.2 Creating an Atlas account

2.1.3 Creating an organization

2.1.4 Creating an Atlas project

2.1.5 Creating a MongoDB Atlas cluster

2.1.6 Navigating the Atlas user interface

2.2 Loading a sample data set

2.3 Adding an IP address to the project access list

2.4 Creating a user

2.5 Establishing a connection to MongoDB through MongoDB Shell (mongosh)

2.6 Managing Data with databases, collections, and documents

2.6.1 Working with dynamic schema

2.6.2 Working with databases

2.6.3 Working with collections

2.6.4 Working with documents

2.7 Summary