Introduction
In this lab, you will learn the fundamental steps of working with MongoDB, focusing on creating and managing databases and collections using the MongoDB Shell (mongosh). You'll explore how to launch the MongoDB Shell, create a new database, add a collection, insert sample documents, and perform basic collection management operations.
Through a hands-on approach, you'll gain practical experience with essential MongoDB commands such as use
, createCollection()
, insertOne()
, insertMany()
, and drop()
. By the end of this lab, you'll have a solid understanding of how to perform basic Create, Read, Update, and Delete (CRUD) operations in MongoDB, setting a strong foundation for more advanced database interactions.