Before we proceed to the installation of Mongo DB, we should first get an idea of what Mongo DB is and its usage.
Mongo DB is an open-source document-oriented database with syntax written in C++ program instead of SQL, commonly referred to as a NoSQL database management program. It is used as an alternative to standard relational databases. NoSQL database is very useful for working with large distributed datasets. Mongo DB is a tool that can manage text-focused, storing, or extracting data.
Mongo DB supports different types of data. It is one of the unrelated web technologies that first appeared in the mid-2000s under the NoSQL declaration. It is used in large data systems and other processing functions that incorporate data that do not fit the rigid relational model. Instead of using tables and rows as on a related website, Mongo DB architecture is made up of collections and documents.
The Mongo DB has numerous advantages over RDBMS:
Mongo DB is widely applicable in various sectors and areas:
MongoDB is a document database that offers high performance, high vacuity, and easy scalability. However, due to its reliable features like a key-value store, MapReduce computation capability, and document-acquainted NoSQL, MongoDB is considered the database for Data Analytics and Big Data processing.
The main idea behind MongoDB is to save as important functionality as possible while allowing vertical scale and, at the same time, to make an inventor's life a little further elegant and manageable. Moreover, it offers essential querying features for fast reclamation, analysis, and consultancy solutions for big data and Business intelligence. Finally, its flexible schema makes it a natural choice for unshaped datasets.
First, you need to install the downloaded file. Then, it will be installed in the folder C:\Program Files\ by default.
A data folder is required to store files in MongoDB. The default location for the MongoDB data directory is c:\data\db. Hence, you need to create this folder by using the Command Prompt. Then, execute the following command sequence.
C:\>md data
C:\md data\db
Then you need to specify 'set dbpath' to the created directory in mongod.exe. To specify, input the following commands in the command prompt and navigate to the current bin directory in the MongoDB installation folder. Let's consider the installation folder to be: C:\Program Files\MongoDB
C:\Users\XYZ>d:cd C:\Program Files\MongoDB\Server\4.2\bin
C:\Program Files\MongoDB\Server\4.2\bin>mongod.exe --dbpath "C:\data"
This command in the command prompt will show a "waiting for connections" message on the console output. This message indicates that the mongod.exe process is running successfully.
Now, to run MongoDB, you need to open another command prompt and issue the following command.
C:\Program Files\MongoDB\Server\4.2\bin>mongo.exe
MongoDB shell version v4.2.1
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("4260beda-f662-4cbe-9bc7-5c1f2242663c") }
MongoDB server version: 4.2.1>
This will show that MongoDB is installed and running successfully. Next time when you run MongoDB, you need to issue only commands.
C:\Program Files\MongoDB\Server\4.2\bin>mongod.exe --dbpath "C:\data"
C:\Program Files\MongoDB\Server\4.2\bin>mongo.exe
You can download the Mongo DB Community .msi installer from the link provided below: https://www.mongodb.com/try/download/community?tck=docs_server
In the version, click on the dropdown button, and select the Mongo DB version to download.
Open and run the installer from Windows Explorer or File Explorer:
The wizard moves you through Mongo DB and Mongo DB Compass.
You can choose either Done (Recommended by most users), or Custom set type. The complete setup option includes Mongo DB and Mongo DB tools in the default location. The custom setup option allows you to specify which functionality is installed and where.
This article covers only general aspects and basic knowledge of the Mongo DB database. More articles on Mongo DB will be uploaded in the future. Do share your feedback or write comments if you find anything incorrect or misleading.
Check out Kockpit Analytics for various Mongo DB-based business analytical and big data solutions and products.
Discover the most interesting topic