MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling. A record in MongoDB is a document, which is a data structure composed of field and value pairs. MongoDB documents are similar to JSON objects. The values of fields may include other documents, arrays, and arrays of documents.
The advantages of using documents are:
- Documents (i.e. objects) correspond to native data types in many programming languages.
- Embedded documents and arrays reduce need for expensive joins.
- Dynamic schema supports fluent polymorphism.
MongoDB provides high performance data persistence. In particular,
- Support for embedded data models reduces I/O activity on database system.
- Indexes support faster queries and can include keys from embedded documents and arrays.
Yes, it is faster than RDBMS database. With same hardware spesification, MongoDB can operate faster than RDBMS database. I prove my selft after longtime ago using PostgeSQL, MS SQL and MySQL. Response time reduce very significant event I'm using ORM base frameworks.
Rich Query Language
I'm done a lot of queries for MongoDB database from programming language. It's all depend on algoritmh in programming language it self and customizeable. It's a litte different than using Stored Procedure or Function on RDMS that will eat a lot of hardware resources.
MongoDB supports a rich query language to support read and write operations as well as:
- data aggregation
- Text search and Geospacial Queries
MongoDB’s replication facility, called replica set, provides:
- automatic failover and
- data redundancy.
A replica set is a group of MongoDB servers that maintain the same data set, providing redundancy and increasing data availability.
MongoDB provides horizontal scalability as part of its core functionality:
- Sharding distributes data across a cluster of machines.
- Tag aware sharding allows for directing data to specific shards, such as to take into consideration geographic distribution of the shards.
Support for Multiple Storage Engine
MongoDB supports multiple storage engines:
In addition, MongoDB provides pluggable storage engine API that allows third parties to develop storage engines for MongoDB.
Install MongoDB on Ubuntu
Install MongoDB on ubuntu is very easy using apt-get. Here's the step:
1. Import public key
2. Create list for MongoDB
3. Reload local package
4. Install MongoDB Packages
That it, you just can run your newly installed MongoDB.
1. To manually start MongoDB server
2. Run MongoDB console
And now you can start populate data in your MongoDB. To stop MongoDB, simply hold alt+C or run