www.oracle.com
What is MongoDB? An Expert Guide - Oracle
Excerpt
- **Transaction support**. MongoDB transactional support is not as mature or robust as that found in traditional relational databases. Complex transactions, especially those that span multiple operations, may not perform as well and can be challenging to implement in MongoDB. - **Data consistency.** MongoDB’s use of “eventual consistency” for replica sets can lead to situations where all users aren’t reading the same data at the same time. For applications that demand strong consistency, this can be a serious drawback. - **Join operations.** MongoDB doesn’t support joins the way SQL databases do. It does, however, offer options that perform a similar function, though they are generally less efficient and can lead to more complex queries and slower performance—especially when dealing with complex relationships between documents. - **Memory use.** MongoDB stores its most frequently used data and indexes in RAM, so its performance is highly dependent on having sufficient RAM. As a result, a MongoDB database can consume more memory resources and, potentially, more hardware than other databases. - **Storage overhead.** The self-containing document paradigm used by MongoDB can lead to larger storage requirements compared to the highly normalized tables in relational databases. Additionally, MongoDB’s dynamic schema can cause data redundancy and fragmentation that can increase storage use—and costs. - **Indexing limitations.** MongoDB supports many indexing options, but maintaining a large number of indexes can degrade write performance. It’s just not built for frequent writes, because each write operation might need to update multiple indexes—often pitting query performance against write performance. - **Cost.** In scenarios where high availability and horizontal scaling are required, the cost associated with running and maintaining a MongoDB cluster—especially in cloud environments—can be significant. The need for lots of RAM and storage can also drive up costs. That’s especially true in high-availability situations where replica databases require an equal number of resources.
Source URL
https://www.oracle.com/database/mongodb/Related Pain Points
Limited join capabilities causing data duplication
7MongoDB's document-oriented model lacks complex join support compared to SQL databases. The $lookup operator provides only basic functionality, forcing developers to redesign data models and embed related data within documents, which results in significant data duplication and storage overhead.
MongoDB eventual consistency breaks real-time data accuracy
7MongoDB uses eventual consistency for replica sets, which can cause situations where different users read different data at the same time. Applications requiring strong consistency and real-time data accuracy face serious issues.
Weak multi-document ACID transaction support
7MongoDB's ACID transaction capabilities are significantly weaker than traditional SQL databases. While multi-document transactions were added in version 4.0, they come with substantial performance overhead and remain difficult to use reliably for applications requiring strict consistency guarantees.
MongoDB indexing degrades write performance
6Maintaining a large number of indexes in MongoDB degrades write performance because each write operation must update multiple indexes. The system forces developers to choose between query performance and write performance.
Large storage overhead in MongoDB
5MongoDB's self-containing document paradigm and dynamic schema lead to larger storage requirements compared to normalized relational databases. Data redundancy and fragmentation further increase storage use and costs.
High memory consumption in MongoDB
5MongoDB stores frequently used data and indexes in RAM, making performance highly dependent on sufficient RAM availability. This can consume more memory resources and require more hardware than other databases, increasing operational costs.