TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The problem with MongoDB

2 pointsby sdominoover 8 years ago

1 comment

daliwaliover 8 years ago
I don&#x27;t think that this is the solution to MongoDB problems mostly because they&#x27;re unsolvable. Here&#x27;s why:<p>- When you update across multiple documents, you&#x27;re not guaranteed that they all succeed or fail. This is why embedded documents is more consistent but less flexible: single document updates are atomic.<p>- When you make queries on multiple documents that depend on the previous query, the running query could be affected by updates that happen in between, otherwise known as lacking serializability. Again, this can be fixed by embedding documents.<p>- When you delete a document, there may be broken references to the deleted document. Unless you have denormalized the references to the deleted document, you must query the entire database to remove broken references.<p>If you go so far to emulate a relational database, you might as well just use one.