MongoDB
MongoDB is
- a Document Database – where entries are stored as documents.
- an Open Source – source code is made freely available and may be redistributed and modified.
An Introduction to MongoDB
How data is stored in MongoDB.
The records are stored as Documents in MongoDB. A Document consists of field:value pairs. A MongoDB Document look similar to a JSON Object.
Following is an example of MongoDB Document.
{
name: "Foo",
age: 34,
cars: [ "BMW 320d", "Audi R8" ]
}
Features of MongoDB
- MongoDB is a NoSQL Database. A NoSQL Database is one that provides mechanism for storage and retrieval of data that is modeled in means other than tabular relations. MongoDB uses field-value pairs to store records and is considered one of the simplest NoSQL Databases.
- MongoDB is a Cross Platform. If can run on Windows Vista or Later, Linux, OS X 10.7 and later, Solaris and FreeBSD.
- MongoDB is Schema-less, meaning fields can vary from document to a document in a collection.
- MongoDB is horizontally Scalable. You may add as many number of nodes (cheap commodity hardware) in the cluster to address large data sets and high throughput applications.
- MongoDB provides Automatic Failover and Data Redundancy. MongoDB Replica Set realized replication of data over nodes, which helps to achieve data redundancy and thus even if primary node fails or goes down, the data is still available on other nodes.
- MongoDB supports Multiple Storage Engines.
Storage Engines are the guys that manage how data is stored in memory. Currently MongoDB supports following storage engines. - MongoDB can do federated faceted search operations.
- MongoDB can do graph operations.
Where could MongoDB be used
With all the capabilities and features of MongoDB known, let us have a look into the places where we can use MongoDB.
Big Data
As NoSQL databases can scale horizontally much more quickly and inexpensively, and low latency for responses operating on highly selective access criteria, and are designed to take advantage of cloud architectures, and many more reasons, MongoDB fits well in Big Data Ecosystem.
MongoDB provides MapReduce, Aggregation Pipelines and many more in-built commands to work with high volumes of data.
Real time Analytics
MongoDB’s low latency and capability to analyze semi-structured or unstructured data makes it a great choice for real time analytics.
Conclusion
In this MongoDB Tutorial, we have presented an Overview of MongoDB. In our next tutorial, we shall have a quick look into the prerequisites and the topics we shall be going through in these series of tutorials.