Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Introduction to MongoDB


May 17, 2021 MongoDB


Table of contents


What is MongoDB?

MongoDB is an open source database system written in the C-language.

In high-load situations, adding more nodes guarantees server performance.

MongoDB is designed to provide scalable, high-performance data storage solutions for WEB applications.

Introduction to MongoDB

MongoDB stores data as a document. MongoDB is a database based on distributed file storage.

FirstName="Arun", Address="St. Xavier's Road", Spouse=[{Name:"Kiran"}], Children=[{Name:"Rihit", Age:8}].
FirstName="Sameer",Address="8 Gandhi Road".

Note: The above data have two different documents (with "." s eparation). A database in which data is stored in this way is a file store. MongoDB is a document-oriented database.



MongoDB download

Download the installation package on MongoDB's official website at: https://www.mongodb.com/try/download/community.


MongoDB features

  • Collection-oriented storage that easily stores data for object types.
  • Mode is free
  • Dynamic queries are supported
  • It is accessible over the network
  • Query support
  • Supports replication and recovery
  • Full indexing is supported and contains internal objects
  • File storage format is BSON (an extension of JSON)
  • Automate fragmentation to support scalability at the cloud computing level
  • Use efficient binary data storage, including large objects such as video
  • Supports Golang, RUBY, PYTHON, JAVA, C, PHP, C, and many other languages
  • MongoDB installation is simple.


The history of MongoDB

  • On August 13, 2019, MongoDB 4.2.0 was released to introduce distributed transactions
  • MongoDB 4.0.2 was released on August 06, 2018 to support multi-document transactions
  • MongoDB 3.0.1 was released on March 17, 2017
  • MongoDB 2.4.8 was released on November 01, 2013
  • MongoDB 2.4.6 was released on August 20, 2013
  • On April 23, 2013, MongoDB 2.4.3 was released, which includes some performance optimizations, feature enhancements, and bug fixes
  • On June 06, 2012, MongoDB 2.0.6 was released, distributed document database
  • On May 23, 2012, the MongoDB2.1 development branch was released! This release has a new architecture and includes many enhancements

MongoDB's language support

MongoDB has an official drive as follows:



The applicable scenario for MongoDB

MongoDB's primary goal is to bridge the gap between key/value storage methods that provide high performance and high scalability, and traditional RDBMS systems, which are rich in functionality. According to the official website, Mongo is suitable for the following scenarios.

  • Web site data: Mongo is ideal for real-time insertion, updates and queries, with the replication and highly scalability required for real-time data storage on the site.
  • Cache: Due to its high performance, Mongo is also suitable as a cache layer for the information infrastructure. After the system restarts, a persistent cache layer built by Mongo avoids overloading the data sources at the lower level.
  • Cache: Due to its high performance, Mongo is also suitable as a cache layer for the information infrastructure. After the system restarts, a persistent cache layer built by Mongo avoids overloading the data sources at the lower level.
  • Highly scalable scenario: Mongo is ideal for databases of dozens or hundreds of servers, and Mongo's roadmap already includes built-in support for the MapReduce engine.
  • Storage of objects and JSON data: Mongo's BSON data format is ideal for documented storage and queries.

There are also limitations to the use of MongoDB, for example, it is not suitable for the following places.

  • Highly transactional systems: for example, banking or accounting systems. Traditional relationship databases are still more suitable for applications that require a large number of atomic complex transactions.
  • Traditional business intelligence applications: BI databases for specific problems produce highly optimized query methods. For such applications, a data warehouse might be a more appropriate choice.
  • A SQL problem is required.

MongoDB application case

Here are some of the practical applications of MongoDB:

  • Billions of records are archived on Craiglist using MongoDB.
  • FourSquare, a location-based social networking site, uses MongoDB to share data on Amazon EC2 servers.
  • Shutterfly, an Internet-based social and personal publishing service, uses MongoDB's various persistent data storage requirements.
  • bit.ly, a Web-based URL shortens the service, using MongoDB to store its own data.
  • spike.com, an associated company of MTV networks, spike.com mongoDB.
  • Intuit, a software and service provider for small businesses and individuals, tracks user data using MongoDB for small businesses.
  • sourceforge.net, resource sites find, create and publish open source software for free, using MongoDB's back-end storage.
  • etsy.com, a website for buying and selling handcrafted items, uses MongoDB.
  • The New York Times, one of the leading online news portals, uses MongoDB.
  • CERN, the prestigious Institute of Particle Physics, uses MongoDB for data from CERN's Large Hadon Collider.