Assessment #9.1: A Quick MongoDB Challenge

Tools

Primary Goals

Demonstrate understanding of how to:

Overview

In this project, you will have 30 minutes to create a new database and a few documents using Mongo. You will be taking screenshots periodically to track your progress and emailing them to your Program Manager.

Basic Requirements

  1. You can do online research, but do not share knowledge with other apprentices today.
  2. Your project is due in 30 minutes.
  3. Email your required screenshots to be reviewed at the end of the assessment.

Setup Instructions


Project Instructions

  1. Open your command line terminal and run MongoDB.
  2. Create a new database called <my-name>-mongo-assessment, replacing with your preferred first name. If there are two apprentices with the same name, add some other letters so we know it’s yours.
  3. In that new database, create a new collection called names.
  4. Add 3 documents to your collection. They will all have the same single field, first_name. The value in the first document should be your first name, and the second and third should be the first names of 2 of your favorite people.
  5. Now add a new field to the same 3 documents. Add the field last_name to all three, and include everyone’s last name. If you’re blanking, you can just name them Dunno.
  6. Last but not least, run the command that lists only the last names in your collection. _ Pause Here. _ Take a screenshot of your terminal to show your successful query response. Find it on your desktop and rename it <my-name>-mongo-documents-query.

Submit your project