Wednesday, February 4, 2015

What is MongoDB and Why MongoDB?

Recently I have playing a lot with MongoDB and it’s  one of the favourite document database. In this blog post we are going to learn about MongoDB in details.

What is MongoDB?

Those who don’t know MongoDB here is what documentation on MongoDB says about it.

MongoDB is a document database that provides high performance, high availability, and easy scalability. Document Database. Documents (objects) map nicely to programming language data types. Embedded documents and arrays reduce need for joins.
A MongoDB is one of popular database. A standard deployment can hold many databases. A database holds a set of collections. It's like similar to tables in relational databases. A collection holds a set of documents just like rows in relational database tables. A document is a set of Key value pair. It’s stores data in such a way that there is no relation is required. It was created by company called 10gen.

MongoDB supports almost all the languages and there are lits of drivers are available for MongoDB and it open sourced at Github at following location.

https://github.com/mongodb

MongoDB Organizations can expect to receive all the benefits of database which delivers:
  • High Performance
  • High Availability
  • Easy Scalability 

Why MongoDB?

There are several reason why people choose MongoDB over other relations databases.

Flexiblility :
There are few things which makes MongoDB quite flexible.
  • You can store data in such way you want there is not restriction on database schema.
  • It’s works on any operating system so you can use it on any platform that your application requires.
Performance and Scalabiltiy:
It’s stored data in JSON format so that performance is blazing fast and It’s also supports indexes that will be again a great features. Another thing is you can easily shard MongoDB database so If your database is growing very fast you can have you data in different shards.

Minimum need for maintenance:
In normal relation databases we need to special database administrator maintain data in databases. While in MongoDB its very to manage and with very few command it will provide all the functionalities.

There many more reason why MongoDB is preferred choice for NO-SQL databases but this three are main.

MongoDB Features:

There are lots of features are provided by MongoDB and followings are few of them.

Document-Oriented:
Instead of storing data in multiple relational tables MongoDB can store minimal numbers of documents like in blogs database you can store tags related to blog post in same document while in relational you might need to have separate table for that.

Indexing:
It’s supports indexes just like relational databases so data retrieval will be very fast.

Load balancing:
MognoDB supports sharding and you can use shard data at multiple locations. The user chooses a shard key, which determines how the data in a collection will be distributed. The data is split into ranges (based on the shard key) and distributed across multiple shards.

Replication:
MongoDB also supports replication just like relational databases. It’s supports replication with replica sets. Each replica set contains two or more copies of the data. There will be two replica set will be there. One replica will act as Primary replica which performs read and write operation while other secondary replica set will create copy of data on top of Primary replica set. If primary replica set will fail then secondary replica set will act as primary and performs all operations of primary.

There are many more features available but this four were main features of MongoDB.  You can find all features of MongoDB as following location.

http://docs.mongodb.org/manual/

That’s it. Hope you like it. Stay tuned for more!
Share:

0 comments:

Post a Comment

Your feedback is very important to me. Please provide your feedback via putting comments.

About Me
My Photo

Full Stack Developer,Blogger,Microsoft Mvp, Mentor, Life long learner, 10+ Years of Experience for JavaScript, web and Microsoft technologies. ASP.NET MVC,Web Forms,C#,AngularJs,Golang
Mvp profile
Subscribe to my blog

Enter your email address:

Follow us on facebook
Blog Archive
Total Pageviews