Why MongoDB is all everyone is talking about?

Why MongoDB is all everyone is talking about?

One minute introduction

JavaScript as a language has taken the industry by storm. There's a sudden increase in the demand for JS developers across the world. There are multiple factors contributing to this growth, one of them is JSON (JavaScript Object Notation). JSON has become the de facto standard to share data by web services and has replaced XML and SOAP by a big margin.

 

What is JSON?

JSON is data represented as an Object in JavaScript.

{"name": "TechBack", "website": "https://techback.in"} is a JSON object and can be shared from server to clients. Here, "name" and "website" are the keys, while "TechBack" and "https://techback.in" are values. So JSON is nothing but a set of key-value pairs. Also, sometimes things just click in industry and then everyone starts using it. Today, be it Google, Facebook, Twitter or any big company which shares/expose their data through APIs are doing it via JSON. Facebook Open Graph API is one important example of that.

 

Why is data sharing needed?

Web world was a happy place when only browser used to get data from server, wrap it up in a nice HTML page and show it to user. Things changed, mobile apps started coming into picture and the apps don't render HTML but still they need some way to send and receive data from the server. You guessed it right, JSON was the answer. With its descriptive key value pair, light footprint and native support in JS it gained popularity.

 With JSON you represent data, as you think of it in your mind.

But why JSON?

The idea is to write APIs from the server once and run it on any kind of front end, be it browsers or mobile apps. Now, browsers have inbuilt support for JSON as they have support for JS as a language, giving JSON a huge advantage. It is also very clean to read and understand.

 

Data as an object has its clear advantages...

From Computer Science 101, we are taught to think of our data as an object. OOP is in the veins of every programmer. With JSON you represent data, as you think of it in your mind. There's no XML tags, there's no table and rows and columns and multiple joins to get the data you want in a particular format. Data representation as simple as this, frees programmer's mind to think about other issues rather than conversion from table to objects or XML to objects and then back.

 you can find  Object Relational Mappers in almost all programming languages of the day.

Enter MongoDB...

MongoDB is famous not only because it's a JSON data store, there are many reasons but the primary reason is this.  It solves the bigger problem of storing data as object. This has been tried from decades, you can find an Object Relational Mappers in almost all programming languages of the day. MongoDB is also very fast and saves a lot of money for the companies who are using it as it can share the database on multiple low end servers, saving the money which is generally invested in buying high end devices for a performant database. MongoDB is a NoSQL database which means it does not store data in tables, rows and columns.

Archana Kumari

ServiceNow Expert | Technical Product Owner at PlayStation | Digital Transformations

8 年

Crisp!!

要查看或添加评论,请登录

社区洞察