Introduction
An organised way to collect and store data is known as a database. The term database can be controlled with the help of DBMS (Database Management System). When the data and the DBMS come together, they are known as Database System, in short, a database. MongoDB and Cassandra are a type of databases that helps the user to handle the data from the server.

This blog will discuss the topic of Mongodb vs Cassandra in detail. Let's start with the definition of MongoDB.
MongoDB
MongoDB is a type of NoSQL database that is made for general purposes. MongoDB stores data in the form of BSON, i.e., Binary JSON. The BSON is an optimized version of the JSON. The data is stored in a key-value pair where you need to define a unique key with a value associated with it.

Users can store any type of data, like integer, string, boolean, double, binary data, array, object, etc, in MongoDB. These key-value pairs are then stored in a document, which in turn is stored in a collection.
Features of MongoDB
As we are now clear with the definition of MongoDB, let us now discuss the features of MongoDB.

-
Document Model can also be used as an object in MongoDB. Hence, developers can focus on the data that needs to be stored
-
Indexes in MongoDB help to increase search speed and performance. Without the indexes, the database needs to search each query one by one until a query matches the server
-
MongoDB has a feature that is Database Triggers. Triggers can be used when a certain query satisfies the condition
-
The Replication in MongoDB helps it to create multiple servers to avoid any disaster that starts by crashing the main server
- Sharding is a process that breaks complex code into easy and simple language. The separated parts also have a cluster, which is used to handle a portion of the dataset
Pros of MongoDB
We will now discuss some pros of using MongoDB. Let us have a look at that.
-
MongoDB is very easy to install and set up to start working on
-
MongoDB supports dynamic queries that help the user use the query language
-
MongoDB is very easy to scale
-
The mapping is not required from application objects to the data objects
- The documentation is available for each topic in MongoDB
Cons of MongoDB
We will now discuss some cons of using MongoDB. Let us have a look at that.
-
MongoDB doesn't support Joins as a relational database does
-
The nesting of documents is not possible after the 100 levels
-
The maximum limit of a document is fixed in MongoDB, which is 16MB
-
The memory space increases due to the absence of the Joins
- The run time may be increased if the user adds manually to the page with the proper code