From the course: Building RESTful APIs with Node.js and Express

Unlock the full course today

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

MongoDB basics refresher

MongoDB basics refresher

- [Instructor] This course is not a full on course on MongoDB. And if you want to follow our course on the subject, feel free to take a look at our library. We'll briefly go over the basics and concepts around using MongoDB so you have a good idea of what we're doing when we implement the code. A MongoDB database is one big object containing collections. Each collection could be like a contextual item like for example, contacts for the database we'll create. Then inside the collection we have documents which are the contacts themselves. So my contact information would be in a document, yours in another, et cetera. And then inside each document, we have the data for each contact such as address, telephone, email, et cetera. The document looks like JSON object with a key value pair approach or arrays of data. So where does Mongos fit into this? Well, Mongos will allow us to set up a schema for a collection and predefine…

Contents