MongoDB provides a lot of advantages, some of which are:
- Flexible documents: A MongoDB collection holds several documents. Each document under one collection can have variable field names and can have a different size as well, which means we don't have to define the schema.
- No complex relationships: The documents in MongoDB are stored as JSON documents, which means we no longer have to scratch our head learning about the relationships between various components of the application.
- Easy to scale: MongoDB is easy to scale as it minimizes the database size by using a partitioning method called sharding. Sharding is a database partitioning method that allows us to segregate a large database into smaller pieces.