
What exactly is MongoDB?
MongoDB is a free and open-source database that employs a document-oriented data format with a non-structured query language. Now It is the most powerful NoSQL system and database.
For modern applications MongoDB Atlas is a globally(WorldWide) accessible cloud database solution. This best-in-class automation and established procedures enable completely managed MongoDB deployment across AWS, Google Cloud, and Azure.
It also guarantees availability, scalability, and adherence to the most strict data security and privacy regulations. MongoDB Cloud is a unified data platform with a worldwide cloud database, search, data lake, mobile, and application services. As a NoSQL tool, it does not employ the traditional rows and columns associated with relational database administration. It is a collection-based and document-based architecture. In this database, the basic unit of data is a set of key-value pairs. It enables papers to contain various fields and architectures. This database employs the BSON document storage format, which is a binary variant of JSON documents.
MongoDB’s data model is very elastic, allowing you to aggregate and store data of various forms without sacrificing sophisticated indexing options, data access, or validation criteria.
MongoDB Architecture (NoSQL Database ):
Database: Each database has its personal set of documents at the document system, and numerous databases can exist at the equal MongoDB server.
Collection: A series is a set of database files. A desk is the RDBMS counterpart of a set. A unmarried database homes the complete series. When it involves collections, there aren’t anyt any schemas. Different files inside the series can also additionally have one of a kind fields, however maximum papers inside a set are designed for the equal motive or to serve the equal quit objective.
Document: A document is a collection of key-value pairs. Dynamic schemas are linked to documents. The advantage of dynamic schemas is that every document in a same collection does not have to have the same structure or data. Additionally, the common fields in a collection document might include a variety of data types.
Important MongoDB Functions:
1)It supports both ad hoc and document-based queries.
2)Indexing is possible for any field in the document.
3)It is capable of Master-Slave replication. MongoDB makes advantage of native programmes to save multiple copies of data.
4)One of the replica set’s benefits is that it has a self-healing shard, which prevents database downtime.
5)Numerous Servers: The database can be distributed over multiple servers. Data is copied to protect the system against hardware failure.
6)Auto-sharding spreads data over many physical divisions known as shards. MongoDB offers an automated load balancing function as a result of sharding.
How to Install MongoDB:
MongoDB is a general-purpose, distributed, document- based NoSQL database developed for cloud-based web application developers. It is one of the most used databases in today’s applications.
To install MongoDB on your PC, follow the steps for your operating system below. Some of the images and versions given here may differ somewhat from those on the MongoDB website, but the basic instructions remain unchanged.
Install MongoDB on Windows:
If you’re using Windows, follow the steps below…
MongoDB’s Installation Documentation When installing MongoDB, here is a fantastic place to start. It is regularly updated and will show you the most recent modifications to any phase of the installation procedure. We’ve also included detailed instructions here.

Make a MongoDB Data Directory:
The first step is to build a data directory in which to keep MongoDB databases. You will be unable to continue the installation without this.Open git Bash, then cd into your computer’s root directory (c: drive):
cd /c
To create a data/db directory, enter the following command once you’re in the root directory:
mkdir -p data/d
This directory will be the default location for MongoDB’s databases. Without a directory of your database MongoDB will be unable to run.
Now you can go further for downloading and installing MongoDB.
Download and Install MongoDB on Windows:
To install MongoDB on your Windows Computer System Visit on the MongoDB Download Center.
As seen in the figure below, ensure that “MongoDB Community Server” is chosen. Choose the most recent version from the Version dropdown option.Then, under OS select Windows, and under Package select MSI File.

Click the Download button, and your browser will alert you that the installation file is downloading in a few seconds. When the installer has finished downloading, run it to begin the installation process. Follow the steps in the Setup Wizard by clicking Next, as illustrated in the figure below:

Click on Next Button
Note: A prompt may show during the installation asking whether you are certain you want to download a certain component of MongoDB. Otherwise, the installation will not complete it will Failed.
Before you may proceed, you must also agree the conditions of the License Agreement. When the installer invites you to select a setup type, click Complete, as illustrated in the figure below:

Click on Complete Button
On the next page, make sure the “Install MongoD as a Service” checkbox is ticked and the option “Run Service as Network Service user” is chosen. These choices should have already been chosen. Leave everything alone and click Next, as indicated in the figure below:

Click on Next Button
After that, you should get a page that reads Install MongoDB Compass.
Important: DO NOT install MongoDB Compass alongside MongoDB.
Check that the Install MongoDB Compass checkbox is not selected, then click Next, as illustrated in the figure below:

On the following page, you’ll notice the phrase “Ready to install MongoDB,” followed by the version number. As illustrated in the screenshot below, click Install to finish installing MongoDB.

Click on Install Button
The final screen you’ll see will indicate that the installation is complete. Finally, click Finish.
Configure MongoDB on Windows:
After installing MongoDB, you must add the PATH to the MongoDB installation to your environmental variables.To do so, follow these steps:
Copy the MongoDB PATH to your clipboard. Open any folder on your computer and choose This PC from the left-hand navigation bar, as seen in the figure below:
Double-click the Program Files folder, then double-click the MongoDB folder. Double-click the Server folder, then double-click the folder named after the MongoDB version number.
Finally, double-click the bin folder. Your screen should look something like this:

Select “Copy address as text” from the menu that appears when you right-click the address at the top of the screen. You should see something similar to the image below

Now Click on Edit System Environment variablesThen you will be redirected to page which looks like an image given below:

Now click on Environment variables below Setting Button and above Apply Button.Now click on Path option and then tap on Edit Option

Once This Step is done then Click on New button and Paste the path which we had Copied path as a Text.Finally click ok for all pages of Environment variables SetUp.then totally restart Git Bash Go to Git Bash and type the following to ensure that the installation was successful:
MONGODB
Then you find the huge no of characters Printed on your screen as showjn in the following Image:

Note: If you get a “command not found” error instead of mongod running, make sure you added MongoDB’s bin location to your PATH variable. After that, exit git bash and restart mongod.
Important: If mongod starts but then exits after a series of prompts, make sure you created the data/db directory in your computer’s root directory (this is the very first step in this walkthrough). This directory is required for MongoDB to function.
Start the Mongo Shell on Windows.To get started with the Mongo shell, launch Git Bash and type the following command:mongo
This will start the Mongo shell and allow you to type Mongo shell commands. Finally, save this collection of MongoDB shell commands for future use.
It’s conceivable that the MongoDB server is already operating as a service on your machine. It’s possible that you don’t need to launch mongod in a separate Git Bash window before starting the Mongo shell. If you are having problems utilising the Mongo shell with the command mongo, launch a new instance of Git Bash and run the command mongod.