MongoDB is an open-source, modern, general-purpose, document-based distributed database management system developed, distributed, and supported by MongoDB Inc. It is a powerful and flexible, agile NoSQL (non-relational) document database that stores data in documents similar to JSON (JavaScript Object Notation) objects. MongoDB runs on Linux, Windows, and macOS operating systems.
It comes with a comprehensive suite of tools for easy data management and it is built for modern application development and for the cloud and intended for use by developers, data analysts, and data scientists.
MongoDB is offered in two different editions: MongoDB Community Server which is the source-available and free-to-use edition of MongoDB and MongoDB Enterprise Server that is a part of the MongoDB Enterprise Advanced subscription.
Download MongoDB
How Does MongoDB Work?
MongoDB is structured on a client-server model where a server daemon accepts connections from clients and processes database actions from them. The server must be running for clients to connect and interact with databases.
Data storage under MongoDB is different from traditional databases. A record in MongoDB is a document (a data structure composed of field and value pairs, similar to JSON objects) and documents are stored in collections (analogous to tables in RDBMS).
Key Features of MongoDB
The following are the key features of MongoDB.
- MongoDB supports read-only views and on-demand materialized views. It also supports arrays and nested objects as values allow for flexible and dynamic schemas. Besides, it supports multiple storage engines and provides a pluggable storage engine API that you can use to develop your storage engines.
- MongoDB is designed for high performance and data persistence. It supports embedded data models that alleviate I/O activity on the database system. Besides, its indexes allow for faster queries and importantly, they can include keys from embedded documents and arrays.
- It comes with a rich and powerful query language (to support read and write operations), supports data aggregation, and other modern use-cases such as text search, graph search, and Geospatial queries.
- It offers the power of relational databases by supporting full ACID transactions, joins in queries, and two types of relationships instead of one: reference and embedded.
- MongoDB also supports high availability, using a replication facility called replica set (a group of MongoDB servers that maintain the data set thus providing automatic failover, data redundancy, and availability). There is also support for horizontal scalability where sharding distributes data across a cluster of MongoDB servers.
- To secure a database deployment, MongoDB provides various security features, such as authentication and authorization, access control, TLS/SSL encryption, auditing, and more.
- Also, it provides a security checklist which is a list of recommended security measures that you need to implement to protect a MongoDB deployment. Also, ensure that you have hardened security at the network and server layer.
MongoDB Client and Tools
Additionally, MongoDB comes with some useful database commands and tools to monitor its performance such as mongostat, mongotop, and more, that help you to view real-time statistics about the state of a running MongoDB instance on the localhost.
To integrate your applications or external systems with a MongoDB database, you can use one of the many official connectors and libraries. There are community-supported libraries as well, such as libmongo-client for C, Djongo for Django, mgo for Go, Mango for Perl, and MongoEngine, MongoKit and other for Python, and much more.
Who is Using MongoDB?
Companies reportedly using MongoDB in their tech stacks, including Google, Facebook, EA Sports, Adobe, Uber, Cisco, Verizon, and many others.
Here are some useful articles about MariaDB: