MongoDB

ML
6 min readAug 30, 2021
Logo of MongoDB

Introduction to MongoDB

  1. The development of MongoDB began in 2007 by 10Gen.
  2. MongoDB is a document database designed for ease of development and scaling.
  3. Data is stored in records called “Document”.
  4. Written in C++.
  5. MongoDB is a NoSQL database.
  • The development of MongoDB began in 2007 by 10Gen.

The 10Gen is a company. So initially you are already heard about 3 services. Software as a service, Infrastructure as a service, Platform as a service. So initially 10Gen organization was based in New York. They are initially 10Gen developed a platform as a service. For example, Windows is a platform. In this particular platform, you can able to install applications based on the cloud service, remote wise. So by using the particular platform you can install the application remotely from in the cloud wise. You can able to access that particular application from anywhere. You are located in anywhere the world you can access that particular application. So initially they are 1oGen developed a platform as a service based on the cloud-based architecture and plan to develop that one. For the storage of application data. As they initially found that, there is no stable database to deal with the platform as a service. To developed the platform in the cloud, there are found that one. There is no stable database that has been developed. To evolve that one or to defense to a deployed platform in a cloud. They have introduced MongoDB initially in 2007.

  • MongoDB is a document database designed for ease of development and scaling.

So in the relational database, you are dealing with tables, rows, and columns. But MongoDB is not like that. It is a document database. Which means JSON. You have already heard about the world as JSON. A data is the presentation format. It’s mainly used for data exchanging.

MongoDB is a document database designed for ease of development and scaling. This means storage and retrieval data is much simpler as flexible than the RDBMS. In RDBMS, you storing the table and access that table. You have to make an, For example, MySQL is an RDBMS database. So to retrieve the from the particular table, You have to make a select command and retrieve the data. But in MongoDB, you are using Key-value pairs. JSON is using the key-value pairs. Based on bypassing the particular key value. You can able to get in that data. So MongoDB is also a database based on the JSON format. Data storage and retrieval will be using the JSON format. So there is a different format called BSON. Once only you are familiar with JSON. I’ll explain in the database as JSON storing the data in the JSON format. I’ll explain what means by BSON.

BSON is the binary encoding of JSON-like documents that MongoDB uses when storing documents in collections. It adds support for data types like Date and binary that aren’t supported in JSON.

  • Data is stored in records called “Document”.

In RDBMS, while you are comparing the MongoDB, it’s a NoSQL database. While comparing the RDBMS, if you get to know about the MongoDB. You’ll get a clear explanation and why MongoDB is an award and emerging nowadays by Most of the organizations.

In MongoDB data is stored in records called “Document”. But RDBMS the data stored as rows. Every row will be saved and based on that row. You’ll get a row/tuple based on that one you get to know about each and every data and self-value soft each table. But in here, each and every row is instead of telling rows. Here we are telling each and every table as a document. So database consists of several collections.

instead of a table, we are telling to name it as a collection. Each will be stored as a document and based on the document only you will get to know every detail that resides in the particular MongoDB.

  • Written in C++.

MongoDB is purely based on C++. So based on C++ only the particular database has been developed.

  • MongoDB is a NoSQL database.

Instead of like in RDBMS, you are storing the data based on tables, rows, columns but not like MongoDB. The MongoDB, the data will be stored as a flexible schema. In RDBMS you are developing a creating the database, First, you have to create the database, then you have to use that particular database, then you have to create the table schema. This means, along with the id with the datatype you are creating schema. But not in here MongoDB is flexible. You can create and add new columns and stuff and insert data is very easy. When you comparing to the RDBMS, That’s why MongoDB is best, Easy to store and retrieve the data from the database.

There is the main reason MongoDB has been introduced. Most of the applications producing an enormous amount of the data as the huge amount of data. For example, if you are taking Facebook. There are hundreds of billions of posts that will be the product to post will be commented day today. Day to day means in minutes manner. A single second of manner. There will be hundreds of posts that have been commended by millions of users and there will be several applications also Facebook, Twitter, and e-bay. There are producing the data in an enormous amount manner and disparate data format. On Youtube/Facebook, they are posting some videos and some of the candidates/users are commended in some others posts. There will be a friend request for several other things. So enormous amount of the data has been produced in mill seconds and disparate data formats. Whether it can be an Mp3 format or image format or there will be a text format. There will be several other types. So to deal with that one in real-time. In real-time RDBMS is based on regit format. It’s not flexible. To add a new column, it is not feasible to add a new column at a certain time. Because to add a new column for a particular table. You have to add some other tables also. Because they are based on referential integrity. It will be like with the foreign key or primary key. The two tables will be link based on the primary/foreign key. So to create a new column in a particular table you have to create that column in other tables also. Based on the referential integrity. So likewise in MongoDB, you no need to create that one. Because it’s based on the Key-value pair. Once you are created one column, it’s automatically redirected by the other document(In MongoDB, the table is called a document).

World Wide users of MongoDB

Users of MongoDB

SEGA: Introduced several games.

GOV.UK-: The government of the UK used MongoDB.

SAP: System Application and Programmers, use for enterprises soft planning. Which means soft for the enterprise soft planning. Within certain organizations, they will be disparates groups. For example Payroll system will be maintained by a separate team, inventory management will be maintained by the separate teams. In order to companies that one enterprise soft planning system has been developed/ evolved.

EA- for Games.

MongoDB is considered an unstructured database. So the RDBMS is considering as a structured database. Because once you are created your database. Use that particular database. You have created that table schema. This means along with a column with the datatype. You are not changing it anymore. In order to change that once. You have to use “alter table”.You have to use that one. But here, it’s a flexible schema. You can add a time you can change that table schema. You can add a certain column and you can add values also. Because it is a key-value pair. So the data will be stored on MongoDB. It is based on the JSON format. So to add a new column and add new values. It can be easily managed by the key-value pair.

Another important thing, MongoDB is a NoSQL database, Operation that you are performed within an SQL database can be easily performed by a NoSQL database also. Within MongoDB, you can operate. What you performed with SQL and also there will be several other advantages. Instead of performing those operations in RDBMS in addition you can perform a certain operation with MongoDB.

--

--

ML

If you believe very strongly in something, stand up and fight for it.