What is MongoDB?
MongoDB is written in C++ and is an open-source database system based on distributed file storage.
Under high load, adding more nodes can ensure server performance.
MongoDB is designed to provide scalable high-performance data storage solutions for web applications.
MongoDB stores data as a document, with the data structure consisting of key-value pairs. MongoDB documents are similar to JSON objects. Field values can include other documents, arrays, and arrays of documents.
Key Features
- MongoDB is a document-oriented database, making operations simple and easy.
- You can set indexes on any property in MongoDB records (e.g., FirstName="Sameer", Address="8 Gandhi Road") for faster sorting.
- You can create data mirrors locally or over the network, enhancing MongoDB's scalability.
- If increased load requires more storage space and processing power, it can be distributed across other nodes in the computer network, known as sharding.
- MongoDB supports rich query expressions. Query commands use JSON-like markup, making it easy to query embedded objects and arrays within documents.
- The update() command in MongoDb can replace entire documents or specific data fields.
- Map/reduce in Mongodb is primarily used for batch data processing and aggregation operations.
- Map and Reduce. The Map function calls emit(key, value) to traverse all records in the collection, passing the key and value to the Reduce function for processing.
- Map and Reduce functions are written in Javascript and can be executed via db.runCommand or the mapreduce command.
- GridFS is a built-in feature in MongoDB for storing large files.
- MongoDB allows server-side scripting. You can write a function in Javascript and execute it directly on the server, or store the function definition on the server for future use.
- MongoDB supports various programming languages: RUBY, PYTHON, JAVA, C++, PHP, C#, and more.
- MongoDB is easy to install.
History
- In October 2007, MongoDB was developed by the 10gen team. It was first released in February 2009.
- On May 23, 2012, MongoDB 2.1 development branch was released! This version featured a new architecture with numerous enhancements.
- On June 6, 2012, MongoDB 2.0.6 was released, a distributed document database.
- On April 23, 2013, MongoDB 2.4.3 was released, including performance optimizations, feature enhancements, and bug fixes.
- On August 20, 2013, MongoDB 2.4.6 was released.
- On November 1, 2013, MongoDB 2.4.8 was released.
- ...
MongoDB Download
You can download the installation package from the MongoDB official website at: https://www.mongodb.com/download-center#community. MongoDB supports the following platforms:
- OS X 32-bit
- OS X 64-bit
- Linux 32-bit
- Linux 64-bit
- Windows 32-bit
- Windows 64-bit
- Solaris i86pc
- Solaris 64
Language Support
MongoDB has official drivers for the following languages:
MongoDB Tools
There are several administration tools available for MongoDB.
Monitoring
MongoDB provides the Munin network and system monitoring tool as a plugin for MongoDB.
Gangila is a high-performance system monitoring tool for MongoDB, also used as a plugin.
Cacti, a graphical interface-based open-source tool for viewing CPU load and network bandwidth utilization, also offers a plugin for monitoring MongoDB.
GUI
- Fang of Mongo – Web-based, built with Django and jQuery.
- Futon4Mongo – A MongoDB clone of the CouchDB Futon web interface.
- Mongo3 – Written in Ruby.
- MongoHub – Application for OSX.
- Opricot – A browser-based MongoDB console, written in PHP.
- Database Master — MongoDB management tool for Windows.
- RockMongo — A lightweight MongoDB management tool in PHP, supporting multiple languages.
MongoDB Use Cases
Here are some companies' actual applications of MongoDB:
- Craigslist uses MongoDB to archive billions of records.
- FourSquare, a location-based social website, uses MongoDB on Amazon EC2 servers to share data.
- Shutterfly, an internet-based social and personal publishing service, uses MongoDB for various persistent data storage needs.
- bit.ly, a web-based URL shortening service, uses MongoDB to store its data.
- spike.com, a subsidiary of MTV Networks, uses MongoDB.
- Intuit, a provider of software and services for small businesses and individuals, uses MongoDB to track user data for small businesses.
- sourceforge.net, a resource website for finding, creating, and publishing free open-source software, uses MongoDB for backend storage.
- etsy.com, a website for buying and selling handmade items, uses MongoDB.
- The New York Times, one of the leading online news portals, uses MongoDB.
- CERN, the renowned particle physics laboratory, uses MongoDB for data from the Large Hadron Collider.