TABLE OF CONTENTS
- 1 What is MongoDB?
What is MongoDB?
MongoDB is a cross-platform document-oriented database program, also called as NoSQL Database. Where cross-platform is a type of software application that works on multiple operating systems or devices. And the document-oriented database program is a computer program, built around JSON-like document used for storing, retrieving & managing.
It is one of the fastest DB which is both natural and flexible for developers to work with. MongoDB also supports various programming languages like :
- C# & .NET
- Ruby, Scala (via Casbah).
Why MongoDB is faster?
One of the main reasons for MongoDB to be faster is, it is a scheme free database that does not have a previously defined structure. So you can store data without previously defining it in the database.
For Example, take a traditional scheme database like MySQL, in this before you perform any operation like Create or Update, you must have a previously defined structure. Like you need to create a table, define columns then you will be able to insert or update data.
But in a scheme free database, neither you create tale nor you define columns. You can directly insert records. Moreover, you can also group records that don’t have the same structure.
Benefits & Drawbacks of MongoDB
1. Scheme less database
MongoDB is a no scheme database which allows you to store and update documents without previously defined structure which also saves a lot of time, as explained above.
2. ease to scale-out
One of the most significant features is you can scale out your deployments quite easily. Which in simple means it is a system that will be able to maintain and increase its level of performance under larger operational demands.
3. Index on any attribute
Index is a special data structure that holds the data of a few fields of documents on which the index is created. It is also used for faster searches. Without indexes, MongoDB must scan every document of a collection to select those documents that match the query statement.
MongoDB is free to use. There is no cost for it.
5. Easy to setup
It is very easy to set up and install it in your system.
MongoDB Inc. provides professional support to its clients. If there is any problem, you can directly reacha MongoDB client support system.
1. No joins supported
In MongoDB, you cannot join two collections. But one can use joins functionality by coding it manually which slows the execution.
2. High memory
MongoDB uses high memory for data storage as it stores key names for each value pairs.
3. Limited size
There is a limit for document size, i.e. you can have documents but not more than 16 MB.