Summary: in this tutorial, you will briefly learn about MongoDB and its features.
Introduction to MongoDB
MongoDB is an open-source, cross-platform, distributed document database. MongoDB is developed by MongoDB Inc. and categorized as a NoSQL database.
1) Easy to use
MongoDB is a document-oriented database. It uses the concept of the document to store data, which is more flexible than the row concept in the relational database management system (RDBMS).
A document allows you to represent complex hierarchical relationships with a single record.
MongoDB doesn’t require predefined schemas that allow you to add to or remove fields from documents more quickly.
2) Designed to scale out
When the database grows, you’ll have a challenge of how to scale it. There are two common ways:
- Scaling up – upgrade the current server to a bigger one with more resources (CPU, RAM, etc). However, getting a bigger server means increasing more costs.
- Scaling out – purchase additional servers and add them to the cluster. This is cheaper and more scalable than scaling up. The downside is that it takes more effort to manage multiple servers than a big one.
MongoDB was designed to scale out.
MongoDB allows you to split data across many servers. It also automatically manages the load balancing across the cluster, redistributing data, and routing updates to the correct servers.
The following picture illustrates how MongoDB scale-out using sharding across multiple servers:
3) Rich features
Like any database system, MongoDB allows you to insert, update, and delete, and select data. In addition, it supports other features including:
- Specify collection and index types
- File Storage
Note that you will learn more about these features in detail in the next tutorial.
4) High performance
MongoDB was designed to maintain the high performance from both architecture and feature perspectives.
The philosophy of MongoDB is to create a full-featured database that is scalable, flexible, and fast.
MongoDB has three editions: community server, enterprise server, and atlas.
1) MongoDB Community Server
The MongoDB Community Edition is free and available on Windows, Linux, and macOS.
MongoDB Community Edition uses the Server Side Public License (SSPL). It means that if you offer MongoDB as a service to the public, you need to open the source code of the software that makes the service works e.g., administration and monitoring tools. Otherwise, you need to pay for the enterprise subscription.
If you use the MongoDB Community Edition as a component of your application, not the final product, you are free to use it.
2) MongoDB Enterprise Server
MongoDB Enterprise Server is a commercial edition of MongoDB as a part of the MongoDB Enterprise Advanced subscription.
3) MongoDB Atlas
MongoDB Atlas is a global cloud database service. It is a database as a service that allows you to focus on building apps rather than spending time managing the databases.
MongoDB Atlas is available on common cloud platforms such as AWS, Azure, and GCP. MongoDB Atlas has a free tier for your experiments.