MongoDB

MongoDB is a document database designed, in its own documentation’s words, to help developers build modern applications faster. Rather than storing data in the fixed rows and columns of a relational table, it stores data in flexible, JSON-like documents, so that data can be modeled the same way an application’s code uses it. The project’s first public releases came in 2009 from the company 10gen, later renamed MongoDB Inc.

In MongoDB’s data model, a record is a document: a data structure composed of field and value pairs that is similar to a JSON object. The documentation notes that the values of fields may include other documents, arrays, and arrays of documents, so related data can be nested inside a single record instead of spread across many joined tables. On disk and over the wire, documents are encoded in BSON, a binary form of JSON that adds extra data types.

This document model became a defining example of the broader NoSQL movement, which sought databases that traded the strict relational schema for flexibility and horizontal scale. MongoDB’s documentation highlights that the model maps documents to native data types in many programming languages, reduces the need for expensive joins through embedded documents and arrays, and supports dynamic schemas where records in the same collection can have different structures.

Because its documents look like JavaScript objects, MongoDB pairs naturally with JavaScript on both server and client, and it became the database in the MEAN stack (MongoDB, Express, Angular, Node.js) and its React-based cousin the MERN stack. These stacks let teams use a single data format, JSON-like documents, from the database through the application server to the browser.