Features of MongoDB

In Previous section, we have discussed about some Introduction of MongoDB. In this section, we will discuss about the Features of MongoDB.

Mongo DB is a document oriented language. It is an open source product and it is developed and supported by a company called 10gen. Mongo DB is available on General Public License for free and it is also available on Commercial License from the manufacture. 

There are lots of Features of MongoDB. Let’s discuss some features in details.

  • Scalable
  • High performance
  • Document Oriented Database
  • NoSQL(Not only SQL)- Non-Relational
  • Distributed
  • Open source
  • Schema free
  • API Driven
  • Easy Replication support
  • Support full Indexing

Scalable:

In electronics (including hardware and software), Scalability is the ability of a system, network, or process to handle a growing amount of work in a capable manner or its ability to be enlarged to accommodate that growth. But in computer science language Scalability means keep on adding more and more computers as we need more and more powers. The main feature of Mongo DB is Horizontal Scalability which is missing in Relational Databases. If we needs double the performance so we double the number of computers. Performance is linearly proportional to the number of computer so that is Horizontal Scalability.

Scalable

High Performance:

Though in case of Mongo DB data stored in huge quantity and support to the data inserted in to the database in high velocity that means we can insert, retrieve, and delete data in huge number in 1 second. So that performance will be higher than other. That’s why mongo DB supports the High Performance feature.

Document Oriented Database:

Document-Oriented Database is a database designed for storing, retrieving, and managing document-oriented information, also known as Semi Structured Data. Document-oriented databases are one of the main categories of so-called NoSQL databases. Document Oriented Database is the one type of Database in which data can be stored in Document format that is in JSON format or in BSON format. BSON format is nothing but Binary JSON format.

Mongo DB supports search by field, range queries, regular expression searches. Queries can return specific fields of documents and also include user-defined JavaScript functions.

BSON supports the embedding of documents, arrays and other data format with other documents and arrays. BSON also con­tains ex­ten­sions that al­low rep­res­ent­a­tion of data types that are not part of the JSON spec. For ex­ample, BSON has a Date type and a Binary Data type.

BSON was de­signed to have the fol­low­ing three char­ac­ter­ist­ics:

  • Lightweight
  • Traversable
  • Efficient

Let’s discuss one by one.

Lightweight:

Keep­ing spa­tial over­head to a min­im­um is im­port­ant for any data rep­res­ent­a­tion format, es­pe­cially when used over the net­work.

Traversable:

BSON is de­signed to be tra­versed eas­ily. This is a vi­tal prop­erty in its role as the primary data rep­res­ent­a­tion for Mon­goDB.

Efficient:

En­cod­ing data to BSON and de­cod­ing from BSON can be per­formed very quickly in most lan­guages due to the use of C data types.

BSON Format

NoSQL:

NoSQL database is generally known as Not only SQL database. That means there are no relations between the databases.  There are some features exist which is supported by MySQL but not by NoSQL like:

  • There is No join support.
  • No complex transaction support.
  • No constraints support at database label, they are implemented in the application.

But there are some extra features exist which is not supported by MySQL but that features are really necessary in our todays life and also in the future life. Some of the examples are:

  • Fast query language
  • Fast performance
  • Horizontal scalable  etc.

Distributed, Open Source and Schema Free:

In the general ways a distributed database is a database in which storage device are not all attached to a common processing unit such as the CPU controlled by a distributed database management system (together sometimes called a distributed database system). It may be stored in multiple computers located in the same physical location; or may be dispersed over a network of interconnected computers. Unlike parallel systems, in which the processors are tightly coupled and constitute a single database system, a distributed database system consists of loosely-coupled sites that share no physical components. From this definition we easily figure out that Mongo DB supports distribution system.

In  Mongo DB system, files can be distributed and copied multiple times between machines transparently, thus effectively create a load balanced and fault tolerant system.

Open Source means free of cost which is available in the internet in free. There is no additional cost required to download and install the Mongo Db software in our system. Schema Free means free of schema that means Mongo DB is free from schema. There is no schema exist inside the database. The whole database supports the collections but not schema.

Below diagram is the graphical representation of the distributed database.

Distributed, Open Source and Schema Free:

Easy Replication and full indexing:

Another Features of MongoDB is Easy Replication and full indexing. Mongo DB supports easy Replication that is Master-Slave Replication in which a Master can perform read, write, and update and a Slave copies data from the master and can only be used for read a back-up but not write. In Mongo DB automatic load balancing is easy to deploy.

Mongo DB support Full Index support that means we can do Reverse indexing, composite indexing, indexing on a single column. This feature of Mongo DB are generally known as Performant.

Capped  Collection:

This type of collection maintains insertion order and once the specified size has been reached, behaves like a circular queue.

File Storage:

It could be used as a file system, taking advantage of load balancing and data replication features. Special features GridFS available for this purpose. In case of Mongo DB data are stored in the document format . such as if a video will be stored in the Mongo DB then it will store in the video format like mp4,avi etc. like that if I want to store the image then it will store in the image format.

Aggregation :

Map Reduce can be used for batch processing of data and aggregation operation offers similar functionality as SQL GROUP BY CLAUSE. Java script can be used in queries. Some available for platforms where Mongo DB can be applied are Windows, Linux, OS X, Solaris.

In case of RDBMS records are converted into object which supports object oriented programming language. But in case of Mongo DB no such conversion is available by which documents are converted into objects that means it does not support object oriented concept.

Summary:

  • Mongo DB is available on General Public License for free and it is also available on Commercial License from the manufacture.
  • The main feature of Mongo DB is Horizontal Scalability which is missing in Relational Databases.
  • Performance is linearly proportional to the number of computer so that is Horizontal Scalability.
  • Mongo DB supports the High Performance feature. This is the important Features of MongoDB.
  • Document-oriented databases are one of the main categories of so-called NoSQL databases.
  • Document Oriented Database is the one type of Database in which data can be stored in Document format that is in JSON format or in BSON format. BSON format is nothing but Binary JSON format.
  • BSON supports the embedding of documents, arrays and other data format with other documents and arrays.
  • Keep­ing spa­tial over­head to a min­im­um is im­port­ant for any data rep­res­ent­a­tion format, es­pe­cially when used over the net­work.
  • Distributed database is a database in which storage device are not all attached to a common processing unit such as the CPU controlled by a distributed database management system (together sometimes called a distributed database system).
  • This type of collection maintains insertion order and once the specified size has been reached, behaves like a circular queue.
  • Some available for platforms where Mongo DB can be applied are Windows, Linux, OS X, Solaris.

In this section, we have discussed about the “Features of MongoDB“. In next tutorial, we will discuss about Some example of MongoDB Database.

Leave a Reply

Your email address will not be published. Required fields are marked *