Before we start, let’s discover what is MongoDB and its features.
What is MongoDB?
MongoDB is document-oriented, as known as the non-relational database used for the storage of high volume data.
What are the differences between relational and non-relational?
MongoDB is based on Binary JSON (BSON). And it is a simple query language which combines rich and document-based queries. The MongoDB data contains a flexible schema. Unlike in SQL databases, where you must have the schema of a table declared before inserting data, the collections of MongoDB do not enforce document structure. That kind of flexibility is what makes MongoDB so strong.
The environments on MongoDB are very scalable. Companies worldwide have identified clusters with some running 100 + nodes in the database with around millions of documents.
Since MongoDB is a NoSQL style database, it stores the data in records, rather than having data in a relational type format. That makes MongoDB very versatile and adaptable to the situation and requirements of the real business world. And also Indexes can be created to improve search performance within MongoDB. It is possible to index any area in a MongoDB database.
Below are some of MongoDB’s main term differences with RDBMS.
Procedure for installing MongoDB on windows
- download MongoDB Community Edition
When you select a version, you can select ‘MongoDB server 4.2’ since it is the latest one.
In the package drop down you have to select ‘MSI’.
Run the previously downloaded MongoDB installer.
Follow the MongoDB community edition installation wizard.
For more information on MongoDB installation:
Crud operations in MongoDB
There are multiple ways to insert data into the database
- Inserting a single document
- Inserting multiple documents
- Inserting single/multiple documents
Ways to update data in the database
- db.collection.updateOne(, , )
- db.collection.updateMany(, , )
- db.collection.replaceOne(, , )
Ways to delete data in the database
You can find more information on MongoDB: