English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Advantages of MongoDB

Any relational database has a typical architectural design that shows the number of tables and the relationships between these tables. In MongoDB, there is no concept of relationships.

Advantages of MongoDB over RDBMS

  • Less schema − MongoDB is a document database where a collection contains different documents. The number of fields, content, and document size between documents may vary.

  • The structure of a single object is clear.

  • No complex joins.

  • In-depth query capabilities. MongoDB supports dynamic querying of documents using a document-based query language that is almost as powerful as SQL.

  • Performance diagnosis, optimization.

  • Easy to scale− MongoDB is easy to scale.

  • No need to convert application objects/Mapped to database objects.

  • Use internal memory storage (windowed) working set, which allows for faster data access.

Why use MongoDB?

  • Document-oriented storage − Class JSON documents as storage, no fixed table schema-free);

  • Full-text indexing support

  • Multiple replicas and high availability

  • Automatic sharding

  • Support for multiple types of queries

  • Fast in-place update

  • map/reduce support

  • gridfs: support for clusters of files of various sizes

Where to use MongoDB?

  • Big data

  • Content management and delivery

  • Mobile and social infrastructure

  • User data management

  • Data center

Performance analysis of MongoDB and RDBMS

In relational database management systems (RDBMS), tables are used as storage elements, while in MongoDB, tables are used as collections.

In RDBMS, we have multiple schemas, and in each schema, we create tables to store data. MongoDB is a document-oriented database where data is written in BSON format (similar to JSON format).

MongoDB is almost as fast as traditional database systems100 times.

Some Similarities and Differences with MySQL

1

2

3MySQL is a relational database, i.e., RDBMS, while MongoDB is schema-Free, it is more like a key-value storage system (kv), but unlike kv, it can also modify the data within documents like MySQL's schema; MongoDB documents are stored in BSON format, which is Binary JSON. BSON is a binary interchange format similar to Google Protocol Buffers.