The NoSQL database, MongoDB, avoids the traditional RDBMS table structure in favour of JSON-like documents with dynamic schemas. This makes the integration of data in certain types of applications easier and faster. MongoDB is most favoured for document stores

MongoDB is a document-oriented database from the NoSQL family. Document databases are suitable for storing and managing Big Data-sized collections of literal documents like text documents, email messages, XML documents, etc.
Documents are de-normalised (aggregate) representations of a database entity, and are suitable for storing semi-structured data that would require the extensive use of nulls in an RDBMS.
An aggregated document can be accessed with a single call to the database rather than having to join multiple tables to respond to a query. The schema in such databases are dynamic, unlike the relational databases, which require the schemas to be defined in advance.
So for agile development approaches, traditional relational models are sometimes not suitable, because each time a new feature is added, the complete schema has to be modified. For more info MongoDB Training
In MongoDB, a record is a document that gets stored in a binary (JSON) format and documents are grouped together into collections. Collections are similar to the tables from relational databases.
The key features of MongoDB are:
- high performance by supporting embedded data models and indexes
- high availability by replica sets to provide automatic failover and data redundancy,
- automatic scaling by automatic sharding
- flexible schema (as the schema of one document can be different from the other within the same collection).
There are several reserved databases, such as the following.
admin: This is a root database. There are certain serverwide commands like readAnyDatabase, readWriteAnyDatabase, dbAdminAnyDatabase, userAdminAnyDatabase, clusterAdmin, etc, that can be run only from the admin database. If users are added to the admin database, they automatically inherit permissions for all the databases.
local: In replication, the local database stores internal replication data for each member of a replica set. Collections from this database will not be replicated.
config: This database will store information about shards (which is explained later in this article).
Core components of the MongoDB package
Mongod: This is a core database process which handles data requests, manages data formats and performs background management operations.
Mongos: This is the controller and query router for sharded clusters, and does the routing service for MongoDB shard configurations, processes and queries from the application layer to determine the location of data in the sharded cluster.
Mongo: This interactive MongoDB shell provides a powerful interface for systems administrators as well as a way for developers to test queries and operations directly with the database. Learn more skills from MongoDB Certification
Installation of MongoDB
MongoDB can be installed on most platforms (Linux, OS X, Windows
), and supports both 32-bit and 64-bit architectures. You can go through the following steps to install MongoDB on your machine, if you are using Ubuntu (version 14+).
Import the public key: The Ubuntu package management tools (i.e., dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. Issue the following command to import the MongoDB public GPG key:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
Reload the local package database, as follows:
sudo apt-get update
Install the latest version of MongoDB by using the following command:
sudo apt-get install mongodb-org
Issue the following command to start MongoDB:
sudo service mongod start
Once you have installed and started MongoDB, you can start the Mongo executable by issuing the following command:
$ mongo
MongoDB shell version: xxx
connecting to: test
By default, the MongoDB shell will be connected to the test database.
> db
test
To get in-depth knowledge, enroll for a live free demo on MongoDB Online Training