MongoDB

A open-source distributed document database that provides high performance, high availability, and automatic scaling.

Document Database

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.

Advantages of using docuemnts are:

  1. Documents correspond to native data types in many programming languages.
  2. Embedded documents and arrays reduce need for expensive joins.
  3. Dynamic schema supports fluent polymorphism.

Key Festures of MongoDB

High Performance

  1. 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.

    Rich Query Language

    Rich query language to support CRUD as well as: Data Aggregation; Text Search and Geospatial Queries.

    High Availability

    It provides:
  2. automatic failover
  3. data redundancy

Horizontal Scalability

  1. sharding distributes data across a cluster of machines
  2. Starting in 3.4, MongoDB supports creating zones of data based on the shard key. In a balanced cluster, MongoDB directs reads and writes covered by a zone only to those shards inside the zone. See the Zones manual page for more information.

Support for multiple storage engines

  1. WiredTiger Storage Engine
  2. In-Momory Storage Engine
  3. MMAPv1 Storage Engine

Expressive query language & Secondary indexes

References

MongoDB