Appendix

1. Introduction to MongoDB

Activity 1.01: Setting Up a Movies Database

Solution:

The following steps will help you complete this activity:

  1. First, connect to your MongoDB cluster that was set up as part of Exercise 1.04, Setting Up Your First Free MongoDB Cluster on Atlas. It should look something like this:

    mongo "mongodb+srv://cluster0-zlury.mongodb.net/test" –username <yourUsername>

  2. Enter the preceding command on your command prompt and provide the password when prompted. Upon successful login, you should see a shell prompt with your cluster name, something like this:

    MongoDB Enterprise Cluster0-shard-0:PRIMARY>

  3. Now, create the movies database and call it moviesDB. Utilize the use command:

    use moviesDB

  4. Create the movies collection ...

Get MongoDB Fundamentals 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.