0
0
MongoDBquery~30 mins

Atlas cluster creation basics in MongoDB - Mini Project: Build & Apply

Choose your learning style9 modes available
Atlas cluster creation basics
📖 Scenario: You are setting up a MongoDB Atlas cluster to store data for a small online bookstore. This cluster will hold collections for books and authors.
🎯 Goal: Create a MongoDB Atlas cluster setup by defining the cluster configuration, adding a database user, and creating the initial collections for books and authors.
📋 What You'll Learn
Create a cluster configuration dictionary with specified parameters
Add a database user with username and password
Create collections named books and authors
Set cluster tier and region as specified
💡 Why This Matters
🌍 Real World
Setting up a MongoDB Atlas cluster is a common first step when building cloud-based applications that need a database.
💼 Career
Database administrators and backend developers often configure clusters and users in MongoDB Atlas to manage data securely and efficiently.
Progress0 / 4 steps
1
Create the cluster configuration dictionary
Create a dictionary called cluster_config with these exact entries: 'name': 'BookstoreCluster', 'tier': 'M0', 'region': 'US_EAST_1'.
MongoDB
Need a hint?

Use curly braces to create a dictionary and include the keys exactly as shown.

2
Add a database user
Add a dictionary called db_user with these exact entries: 'username': 'bookadmin' and 'password': 'securePass123'.
MongoDB
Need a hint?

Remember to use the exact keys and values for the user dictionary.

3
Create collections for books and authors
Create a list called collections containing the exact strings 'books' and 'authors'.
MongoDB
Need a hint?

Use square brackets to create a list with the two collection names as strings.

4
Complete the cluster setup dictionary
Create a dictionary called atlas_cluster that includes the keys 'config' with value cluster_config, 'user' with value db_user, and 'collections' with value collections.
MongoDB
Need a hint?

Use the variable names exactly as given to build the final dictionary.