by chris_wot · 10y ago · 0 comments
I'm trying to understand why anyone would pick MongoDB over PostgreSQL these days?
For new projects, I agree with you!
Then there are all kinds of other issues related indexes and the differences between mongo and PostgreSQL and so on.
Conversely, the more recent a piece of tech is, the more likely it is go into production right away, with people only starting to question their decision after the 3 year new-and-shiny barrier is broken (but usually not because of its faults, but because something newer and shinier can now replace it).
[1] http://cryto.net/~joepie91/blog/2015/07/19/why-you-should-ne...
[2] http://www.sarahmei.com/blog/2013/11/11/why-you-should-never...
[3] https://aphyr.com/posts/322-call-me-maybe-mongodb-stale-read...
Edit: incidentally, don't you think it's ironic that the "new and shiny" thing that was supposed to knock relational databases (now over 36 years old) off it's perch has been found to be lacking in a variety of areas, not least of which is that a "schemaless" document store almost always gains a defacto schema?
Seems to me that the ability to join and divide two relations is a fantastic application of relational algebra and not something you can do particularly well in MongoDB at all.
I would argue that JSON(b) support is now production ready in Postgres 9.5+. You can read, write, update, delete, and it is fast.
I mean that this persons code is not production-ready. As in there is no chance it emulates all of the features of mongo or has been performance tested etc.
http://www.postgresql.org/docs/9.4/static/datatype-json.html
Which is a problem why, precisely?
Also, speaking as someone who was an operator of a large Postgres DB and who is now an operator of a large Mongo DB, although Mongo has a nominal lead in this one area for the time being, by going to Mongo you sacrifice a lot (I really can't emphasize this point enough; the distribution/sharding story is really the only thing that Mongo is doing a better job of right now, Postgres is a clear winner in every other way). I'm really looking forward to (and hoping for) extensions like Citus becoming more mature so that optimal choice of database will be obvious under all circumstances.
[1] https://www.citusdata.com/blog/17-ozgun-erdogan/403-citus-un...
http://www.slideshare.net/8kdata/torodb-scaling-postgresql-l...
Edit: does this help? ToroDB do certainly need to get better documentation :(
https://github.com/torodb/torodb/wiki/Setting-up-ToroDB-as-h...