3 ms·
I agree that document-oriented databases will probably not replace relational databases in the near future. In my opinion though, the schemaless design of Mongo
by ThePhysicist 13y ago
I agree that document-oriented databases will probably not replace relational databases in the near future. In my opinion though, the schemaless design of MongoDB paired with its ease of use and its native support of JSON data makes it a perfect choice for prototyping and (in some cases) a viable option for use in production.
What you also have to consider when comparing document-oriented to relational databases is that the former is still a very young technology: MongoDB has been founded in 2007, whereas Postgres has been around since 1986! So given what the MongoDB team has achieved in such a short time span, I expect to see some huge improvements in this technology over the next decade, especially given the large amount of funding that 10gen received.
In addition, the root cause for most complaints ("it doesn't scale!", "it loses my data!", "it's not consistent!") is that people try to apply design patterns from relational databases to MongoDB, which often is just a horrible idea. Document databases and relational databases are very different beasts and need to be handled very differently: Most design patterns for relational databases (data normalization, using joins to group data, using flat data structures, scaling vertically instead of horizontally) are actually anti-patterns in the non-relational world. If you take this into account I think MongoDB can be an awesome tool.
- theseoafs 13y agoTo be fair this particular complaint: > "it loses my data!" is entirely legitimate. A database product should not be losing data unless you specifically allow it to. Period.
- laichzeit0 13y agoThere's cases where occasional data loss is an acceptable trade off for performance. In a particular app I'm working on it's ok for me to have 99.9% of the data and all my updates and inserts have write concern set to 0, journaling off, etc.
- theseoafs 13y agoSure, hence: > A database product should not be losing data unless you specifically allow it to.
- camus2 13y ago> In addition, the root cause for most complaints ("it doesn't scale!", "it loses my data!", "it's not consistent!") is that people try to apply design patterns from relational databases to MongoDB, which often is just a horrible idea. Is expecting a database to be acid a horrible idea? if you care about your datas it is not.
- ThePhysicist 13y agoNo that's probably not a horrible idea, I'm just saying that MongoDB is by design not an ACID database, so I think it's silly to complain about this fact when using it.