MongoDB tutorial provides basic and advanced concepts of SQL. Our MongoDB tutorial is designed for beginners and professionals.
MongoDB is a No SQL database. It is an open-source, cross-platform, document-oriented database written in C++.
Our MongoDB tutorial includes all topics of MongoDB database such as insert documents, update documents, delete documents, query documents, projection, sort() and limit() methods, create a collection, drop collection, etc. There are also given MongoDB interview questions to help you better understand the MongoDB database.
What is MongoDB
MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling.
In simple words, you can say that - Mongo DB is a document-oriented database. It is an open source product, developed and supported by a company named 10gen.
MongoDB is available under General Public license for free, and it is also available under Commercial license from the manufacturer.
The manufacturing company 10gen has defined MongoDB as:
"MongoDB is a scalable, open source, high performance, document-oriented database." - 10gen
MongoDB was designed to work with commodity servers. Now it is used by the company of all sizes, across all industry.
History of MongoDB
The initial development of MongoDB began in 2007 when the company was building a platform as a service similar to window azure.
Window azure is a cloud computing platform and infrastructure, created by Microsoft, to build, deploy and manage applications and service through a global network.
MongoDB was developed by a NewYork based organization named 10gen which is now known as MongoDB Inc. It was initially developed as a PAAS (Platform as a Service). Later in 2009, it is introduced in the market as an open source database server that was maintained and supported by MongoDB Inc.
The first ready production of MongoDB has been considered from version 1.4 which was released in March 2010.
MongoDB2.4.9 was the latest and stable version which was released on January 10, 2014.
Purpose of Building MongoDB
It may be a very genuine question that - "what was the need of MongoDB although there were many databases in action?"
There is a simple answer:
All the modern applications require big data, fast features development, flexible deployment, and the older database systems not competent enough, so the MongoDB was needed.
The primary purpose of building MongoDB is:
First of all, we should know what is document oriented database?
Example of Document-Oriented Database
MongoDB is a document-oriented database. It is a key feature of MongoDB. It offers a document-oriented storage. It is very simple you can program it easily.
MongoDB stores data as documents, so it is known as document-oriented database.
There are two different documents (separated by ".").
Storing data in this manner is called as document-oriented database.
Mongo DB falls into a class of databases that calls Document Oriented Databases. There is also a broad category of database known as No SQL Databases.
Features of MongoDB
These are some important features of MongoDB:
1. Support ad hoc queries
In MongoDB, you can search by field, range query and it also supports regular expression searches.
You can index any field in a document.
MongoDB supports Master Slave replication.
A master can perform Reads and Writes and a Slave copies data from the master and can only be used for reads or back up (not writes)
4. Duplication of data
MongoDB can run over multiple servers. The data is duplicated to keep the system up and also keep its running condition in case of hardware failure.
5. Load balancing
It has an automatic load balancing configuration because of data placed in shards.
6. Supports map reduce and aggregation tools.
8. It is a schema-less database written in C++.
9. Provides high performance.
10. Stores files of any size easily without complicating your stack.
11. Easy to administer in the case of failures.
12. It also supports:
Before learning MongoDB, you must have the basic knowledge of SQL and OOPs.
Our MongoDB tutorial is designed to help beginners and professionals.
We assure that you will not find any problem in this MongoDB tutorial. But if there is any mistake, please post the problem in contact form.