From the course: Next.js: Creating and Hosting a Full-Stack Site

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

What is MongoDB?

What is MongoDB?

- [Instructor] All right, so now that we've created the pages and the route handlers for our application, we're going to take a look at how to add a basic database to our app, and the specific type of database we're going to be using is called MongoDB. So, let's talk about some of the basics of MongoDB. The first thing to know about using databases in general here is that they allow us to persist our application's data. As I'll show you shortly, whenever our application restarts, if we have some sort of hard-coded data or structure that we've been using to take changes in our application into account, whenever our application restarts, those changes are wiped away, and we start from whatever we hard-coded into our program. So, databases allow us to get around this, and they give us a way to persist our application's data. The reason that we chose MongoDB specifically for this application is because MongoDB is what's known as a NoSQL database, meaning in this case that MongoDB stores…

Contents