Friday, April 12, 2013

Why to choose MongoDB over other Document-Oriented NoSQL Stores?

MongoDB is a document-oriented datastore. NoSQL data stores such as MongoDB and Cassandra are so vastly different from each other that apples-to-apples comparisons are practically impossible. Thus, within the world of NoSQL, there are subcategories such as key-value stores, graph databases, and document-oriented stores. Here are some of the reasons on why to choose MongoDB over NoSQL Stores:

  • MongoDB, an open source, schema-free document store written in C++.
  • Support for a wide array of programming languages. Thus, a wide variety of applications can leverage Mongo from Java to Ruby to PHP.
  • A SQL-like query language. Developers can access Mongo via its own shell, which uses a JavaScript query language.
  • Easy to learn
  • Quick Installation
  • Large Communitry. e.g. the community around Mongo has created higher-level, ORM-like libraries, which leverage core platform drivers, thus providing a closer mapping of objects in code to documents.
  • Plugin support
  • In addition to strong community backing and commercial support, Mongo benefits from excellent documentation. A number of published books are available.
  • Extensive driver support
  • Support on Windows
  • Documents are stored in a binary JSON format, dubbed BSON. JSON is an extremely understandable format. Humans can easily read it (as opposed to XML, for example) and machines can efficiently parse it.
  • Out of the box, Mongo supports sharding, which permits horizontal scaling by divvying up a collection of documents across a cluster of nodes, thus making reads faster.
  • Mongo offers replication in two modes: master-slave and replica sets. In a replica set, there is no master node; instead, all nodes are copies of one another and there is no single point of failure. Replica sets therefore bring more fault tolerance to larger environments supporting massive amounts of data.
  • They do not need massive hardware expenditures. Mongo can run on commodity hardware platforms, provided there is a healthy amount of memory.
  • Mongo offers MapReduce, a powerful searching algorithm for batch processing and aggregations that is somewhat similar to SQL's group by.
  • Role-Based Privileges allow organizations to assign more granular security policies for server, database and cluster administration.

No comments: