Introduction

These days, I am working on MongoDB databases. That's why I thought to write a series of articles on MongoDB. This is the first article in the new series. Today, I will provide a brief introduction to MongoDB.

MongoDB

MongoDB

MongoDB is a document-based, open-source database. MongoDB is a leading NoSQL database. It provides high performance, high availability, auto sharding, and automatic scaling. MongoDB database is written mainly in C++. Its drivers and client libraries are typically written in their respective languages, although some drivers use C extensions for better performance. MongoDB differs from relational databases because it is a schema-less database. Such databases usually have lower transaction safety but are faster in accessing data and scale compared to relational databases.

History of MongoDB

MongoDB was developed in October 2007 by a New York-based organization, 10gen, now called MongoDB Inc. It is written in C, C++, and JavaScript. MongoDB was initially developed as a Platform as a Service (PAAS). In 2009 MongoDB was introduced as an open-source database server. MongoDB provides backend services to many websites and to other services. For example, eBay, Foursquare, Viacom, Craigslist and the New York Times.

Document Database

Document Database

MongoDB stores data as documents. So it is a document-based database. A document is a data structure that stores the data in field and value pairs. The format of MongoDB documents are similar to JavaScript Object Notation (JSON). The values of a field may include a simple value, array and other documents. MongoDB uses BSON format to store the data into a document.

The following are the advantages of a document type database:

BSON

BSON

MongoDB represents JSON documents in a binary-encoded format called BSON behind the scenes. BSON extends the JSON model to provide additional data types and to be efficient for the encoding and decoding within various languages. It adds support for data types like date and binary that aren't supported in JSON.

The implementation of BSON in MongoDB has some benefits, for example:

Transaction Management in MongoDB

MongoDB doesn't support multiple document transactions. It only provides atomic operations on a single document. These atomic operations are sufficient to handle the problem that requires transaction management.

Basic Translation Terms/Concepts:
RDBMS vs MondoDB

Translation Terms

Key Features of MongoDB

MongoDB is a document type of database that uses JSON format for the data store.

The following are some key features of MongoDB.

Thanks for reading this article. In the next article, I will explain how to install MongoDB on your machine.

Next article >> Day 2 - MongoDB Installation on Windows Machine