Introduction to MongoDB

Mongo DB

MongoDB Definition


MongoDB is an open-source database management system that uses an document-based model which supports multiple forms of data.

Advantages

1. Documentation: Having good documentation can make life easier for developer’s even when they are new to technology. MongoDB has superb documentation.

2. Documents = Objects: The good thing about having a document database is that your object can directly be stored as a single document through MongoDB.

3. Performance: Query performance is one of the strong points when using MongoDB.

4. Easy to learn: MongoDB is easy to learn and quick to start with. The basic installation, setup and execution does not take more than a few hours.

MongoDB Software Installation

Download the MongoDB MSI Installer Package

Click on the Click on https://www.mongodb.com/try/download/community and Download the MondoDB Community Server. We will install the 64-bit version for Windows

Install MongoDB with the Installation Wizard

1. Make sure you are logged in as a user with Admin privileges. Then, you would navigate to your download folder and double click on the .msi package that was downloaded. This would launch the Installation Wizard.

2. Click Next to start the Installation

3. Accept the License Agreement and then Click on Next

5. Choose the “Run Service as Network Service User” and it is important to make a note of the data directory, which we will need later on.

6. During this time, we don’t need to download Mongo Compass and so you would need to deselect it when also clicking on Next.

7. Click on Install in order to begin the Installation of MongoDB 

8. Hit Finish to complete the installation process for MongoDB.

Create A Data Folder in Order to Store our Databases

1. Navigate to the C Drive on your computer when using Explorer and from there you would be able to create a new folder called data.

2. Double click on the data folder you have created in the C Drive and from there you would create another folder called db.

MongoDB Configuration Instructions

Using The MongoDB Commands

The use of the basic MongoDB commands are being described in the video above. The video teaches the user how to create a simple database, using the insert command to add documents to the database created, and it also shows how to add multiple documents using the var command in MongoDB. The other basic command being described in the video is known as remove, which deletes one or multiple documents from the database collection that has been created in MongoDB.

Using simple MongoDB commands include update and the remove command. The video describes how to use the update and the remove command on a sample collection that was created on MongoDB. It also describes the command for inserting multiple documents into a collection. JSON format is very important in MongoDB because it makes it easier for the user to read and write and it prints out the documents in an organized manner.

MongoDB Mini Project

The following video above shows a mini project using MongoDB and its basic commands like creating a new database called cars. When you create the new database, you can see we have added two documents into the new cars database. It also explains how to use the findOne command when searching for at least one of the documents inserted into our new database.

Conclusion

Thank you for being able to join me throughout this course and I hope that by using that you are able to learn a lot by watching the videos on MongoDB. I wasn’t able to cover everything, since this was just covering the basic material from MongoDB.

MongoDB LEARN IN 1 DAY

MongoDB 4 Quick Start Guide

By Richard Keen Graduate From New York College of Technology

Share on Fabebook
Share on Twitter
Share on Linkedin
Share on Pinterest
Scroll to Top