Overview

MongoDB is a NoSQL, non-relational database. If you know SQL, you can think of MongoDB as its opposite.

Databases & Collections

You can have multiple databases (though one per project is plenty) in MongoDB. In a database, there are many collections. You can think of them as SQL tables. You would usually create a collection for a group (e.g. user collection, location collection, etc.). In a collection, you store documents, which contain the data records. Read more here

Documents

Each data record is represented by a document, a JSON-like object with field-value pairs. Read more here

{
	name: "John Smith",
  age: 30,
  address: {
		street: "100 Brooklyn Ave",
		city: "New York",
		state: "NY",
		zip: 98023
  },
  children: ["Sue Smith", "Adam Smith"]
}

Installation

You can download MongoDB here

MongoDB Community Download

If you need further details, visit here

Install MongoDB Community Edition

<aside> ‼️ If you are a MacOS user, please follow this guide

</aside>

<aside> 💡 It is highly recommended to download MongoDB Compass, a user-friendly GUI 🤓 *note you can install Compass through the installer as one of the options

</aside>

MongoDB Compass

Verifying

Once installed, you can verify that MongoDB is running by connecting to it through MongoDB Compass (or mongosh).

Additional Information