Getting Started with Mongo DB


What’s MongoDB?

MongoDB represents an open-source, document-oriented, developed and supported by a company called 10gen. MongoDB is written in C++, and it is a popular NOSQL database. NoSQL merely intends non-relational databases, i.e., there are table-like relational database structures. This formatting of stores is titled BSON and is many lookalikes to JSON.

Why is MongoDB used?

SQL was invented in the 70s for storing data. MongoDB stores documents (or) objects. Nowadays, everyone works with objects. For example, Python, Ruby, Java, etc., require databases for our objects to survive. Embedded documents and arrays reduce the need for joints.

Data as documents

  • MongoDB stores data in binary representation called BSON. The BSON encoding extends the popular JSON representation to include additional types such as int, long, date, floating-point, etc.
    All the data for a record given in the MongoDB documents will be contained in a single document.

When did MongoDB come into existence?

The first version of MongoDB databases shipped in August 2009 once the company built a platform as a service similar to Window Azure. MongoDB was developed by 10gen, a New York-based organization known as MongoDB Inc. It was initially created as a PAAS. . Later in 2009, it was launched as an open-source database server maintained and supported by MongoDB Inc.
MongoDB 2.4.9 is the latest and most stable version, released on January 10, 2014. Currently, the newest version released in 2017 is MongoDB 3.6.

Advantages

  • MongoDB can search by field and range.
  • It can index any field in a document.
  • Supports Master-Slave replication.
  • It can run over multiple servers.
  • It has an automatic load balancing configuration.
  • Supports map-reduce and aggAggregations tools.
  • Uses JavaScript rather than procedures.
  • Supports a Cross-platform operating system.

Disadvantages

  • It utilizes high memory of data storage.
  • It does not enable storing more than 16MB of data within the documents.
  • The nesting of data in BSON is additionally limited.