You are on page 1of 3

MONGODB

1. Definition of MongoDB
MongoDB is the most popular NoSQL database, is an open-source
document-oriented database., used by millions of people. MongoDB is written in
C++.
MongoDB replaces the concept of rows of conventional relational data
models with something called as documents, it offers developers the flexibility to
work with evolving data models since it’s document based MongoDB allows
embedded documents, arrays and represents complex hierarchical relationships
using a single record
It is also schema free which means that the keys defined in the document are
not fixed as a result massive data migration can be ruled out.
In addition, MongoDB is a cross-platform database, working on Collection
and Document concepts, it provides high performance, high availability and easy
scalability.

2. Why MongoDB is used?


There are the few reasons why MongoDB is widely used:
First is flexibility: MongoDB’s notion of documents that can contain sub-
documents nested in complex , hierarchies is really expressive and flexible.
Flexible query model: a user can selectively index some part of a document
or a query, based on attribute values regular, expressions or ranges.
Native aggregation: native aggregation allows its users to extract and
transform data from MongoDB and either load them in a new format or export it
from MongoDB to other data sourse. It makes it extremely compatible.
The schema free model: now applications get the power and responsibility
to interpret different properties in different ways. Now that you know what
MongoDB is and why exactly it’s used.

3. Characteristics of MongoDB
General purpose database: now MongoDB can serve heterogeneous loads
and multiple purposes within an application
Flexible schema design: document-oriented approaches with non- defined
attributes that can be modified on the fly is a key contrast between MongoDB and
any other relational database.
Scalability and load balancing: it’s built to scale both vertically but most
importantly, horizontally using sharding and architect can share load between
different instances and achieve both read and write scalability when it comes to
load balancing this happens automatically and transparently to the user by the
shard balancer.
Aggregation framework: now MongoDB offers an extract transform and
load framework that eliminates need for complex data pipelines.
Native replication: now date will get replicated across a replica set without
complicated setup
Security features both authentication and authorization are taken into
account in mongoDB
JSON is widely used across the web for front end and api communication
and as such it’s easier when the database is also compatible with the same protocol.
Mapreduce: now again mapreduce is an excellent tool to build data
pipelines and mongoDB uses mapreduce readily

4. How does MongoDB work?


MongoDB work in two layers:
- Application Layer and
- Data layer
Application Layer is also known as the Final Abstraction Layer, it has two-
parts, first is a Frontend (User Interface) and the second is Backend (server). The
frontend is the place where the user uses MongoDB with the help of a Web or
Mobile. This web and mobile include web pages, mobile applications, android
default applications, IOS applications, etc. The backend contains a server which is
used to perform server-side logic and also contain drivers or mongo shell to
interact with MongoDB server with the help of queries.
These queries are sent to the MongoDB server present in the Data Layer. Now,
the MongoDB server receives the queries and passes the received queries to the
storage engine. MongoDB server itself does not directly read or write the data to
the files or disk or memory. After passing the received queries to the storage
engine, the storage engine is responsible to read or write the data in the files or
memory basically it manages the data.
5. Advantages and disadvantages
* Advantages
- Less schema: Because schema was born to group objects into a cluster, easy to
manage. For example, creating a schema named Students, for example, only what
is related to student will be included in this schema. Whereas in mongodb, only
one collection can contain many different documents. For each document, the
number of fields, content, and size may be different.
- The structure of an object is clear.
- No complicated Joins.
- Extremely scalable: expanding data without having to worry about problems such
as foreign keys, primary keys, check constraints, ... MongoDB allows to perform
replication and sharding, so the expansion is also convenient than.
- Using internal memory to hold the workbook allows for faster data access.
Updating is done quickly thanks to update in-place (in-place).

* Disadvantages
- Data is cached, taking RAM as the focus of the operation, so when operating, it
requires a large RAM memory
- Any changes to the default data are not immediately written to the hard drive, so
the possibility of data loss due to unexpected power failure is very high.

6. Some of the commonly used application of MongoDB.


Areas of technologies use mongoDB as their dbms, currently some of them
are internet of things , mobile applications, real time analysis, personalization,
catalog management and content management

You might also like