Why Use MongoDB?
Tags: mongodb
Published: 2020-11-06 16:27:13

---
title: Why Use MongoDB?
published: True
description: MongoDB is a very powerful database system. It doesn't work with SQL, so you'll have to learn a new language. The data is stored as JSON documents, so it is possible to create complex trees.
tags: MongoDB
//cover_image: https://www.bloorresearch.com/wp-content/uploads/2013/03/MONGO-DB-logo-300x470--x.png
---

MongoDB is a database system. It has become extremely popular over the past few years.

In this article, we'll take a look at what MongoDB is, when to use it, and when to avoid it.

<h2>What is MongoDB?</h2>

MongoDB is an object-oriented, dynamic, stable, scalable, SQL-free database system. The objects are stored in JSON format in separate documents. Instead of storing the data as tables with values, we use a hierarchy and a JSON object system to create a more adaptive system.

The advantage of MongoDB is to implement a high-performance system with perfect scalability. The system is extremely easy to install, it works under all operating systems and there are libraries to handle it in all languages.

<h2>MongoDB vs SQL</h2>

The vast majority of databases run on SQL. Be it SQLite, Postgres or even Mysql, the base language is common. MongoDB belongs to the family of NoSQL languages. The code and functionality are therefore fundamentally different.

Where SQL will use a system of tables and complex relations, MongoDB works quite simply. We create a document with tree data. It is then possible to link these documents with links by _id

MongoDB's big advantage over SQL is its ability to handle complex data systems. We can have lists, encapsulated objects without having to worry.

This operation greatly facilitates the development of applications that handle a lot of data. With a little practice, it is possible to create extremely well-organized document templates, which saves time.

<h2>The advantages of MongoDB</h2>

No system is perfect, so let's take a look at the advantages of MongoDB to help you make a choice:

- Document orientation
- Excellent performance
- Simple to replicate
- Very good scalability
- A totally dynamic system
- Very good flexibility
- Heterogeneous data
- A management system in JSON and BSON (binary JSON)
- A search and modification system as good as SQL

Excellent performance compared to the cloud. AWS, Google Cloud and Azure offer solutions to implement MongoDB very easily.

<h2>The disadvantages of MongoDB</h2>

MongoDB has a few drawbacks. It is important to take them into account when making your decision:

- Does not work with a table system, so you need to learn how to create document schemas
- Complex transactions
- No direct system to create links between documents

<h4>In which situation to choose MongoDB</h4>
Here is a list of the types of applications that work very well with MongoDB:

- An e-commerce site
- Blogs and content management
- Real-time management applications
- Social networks

<h2>In conclusion</h2>

MongoDB is a very powerful database system. It doesn't work with SQL, so you'll have to learn a new language. The data is stored as JSON documents, so it is possible to create complex trees.