What is MongoDB?

According to www.mongodb.org

“MongoDB (from “humongous”) is an open-source document database, and the leading NoSQL database.”

Most of us are more familiar with a different type of databases called “Relational Databases” in which the data is saved in the form of tables and connected with “Relations”. Inside the tables the data is divided in to rows and columns and these tables have a defined schema and all records in that table should conform to the schema of that particular table. The schema is defined at the time of creation of the table. For an example:

If we wanted to create a table which could hold Post and its comments then in relation database we will create something like this.



But in case of MongoDb the structure will be like the one below.


“Post”:”this is a post”
“Comments”: [“Comment 1”,
“Comment 2”,…..


This format is known as BSON , which stands for Binary JSON because it closely resembles JSON format.


Posted by Sheraz Lodhi

Leave a Reply