Introduction to MongoDB

Data persistence is integral to the vast majority of web applications. Local storage has limitations and poses security risks, and SaaS options such as Firebase work well, but ultimately being able to understand how to structure, build, and query your own database are important skills for any full stack developer to have. For example, consider Twitter. Where are your username and password stored? Or perhaps where all of your Tweets might be fetched from? How does the application determine what Tweets are shown to you every time you log on? These operations are handled by a database. Databases are split into “relational” and “non-relational” types of databases, and each handles data and scaling in different manners. This article goes in depth with the difference between the two. This lesson will teach you about MongoDB, a popular NoSQL database.

Learning Outcomes

By the end of this lesson, you should be able to do the following:

  • Set up a database on MongoDB Atlas
  • Use the mongo shell
  • Create, edit, and delete documents in a MongoDB database using the mongo shell

Assignment

Knowledge Check

This section contains questions for you to check your understanding of this lesson. If you’re having trouble answering the questions below on your own, review the material above to find the answer.

Improve this lesson on GitHub

Have a question?

Chat with our friendly Odin community in our Discord chatrooms!

Open Discord