4 ms·
Why are people still choosing Mongo over Postgres these days? If there's something I'm missing, I'm genuinely curious as I'm not against json data and frequency
by cpursley 3y ago
Why are people still choosing Mongo over Postgres these days? If there's something I'm missing, I'm genuinely curious as I'm not against json data and frequency use jsonb tables in Postgres.
- deleted 3y ago[deleted]
- godzillabrennus 3y agoPeople use MongoDB because it’s easy to get started. It does “db stuff” and “authentication”. I’ve given up trying to fight the trend. I just recognize immediately when it is used early on that the devs are still operating with training wheels on.
- winrid 3y agoSometimes this is the case but not always... It's nice to just work with objects in some languages... for some projects. That's engineering - picking trade offs :)
- cpursley 3y agoExcept you can have objects in Postgres via jsonb; there's no trade off and you're both future and vendor proofed.
- winrid 3y agoYeah, there is. PG has its own warts that Mongo does not have. Also the JSONB query language sucks. See appending an array in PG [0] vs Mongo [1]. Also PG does not provide a way to atomically append to the array, you have to lock the row via SELECT ... FOR UPDATE. Mongo's $push, $set, etc, are atomic. [0] https://pastebin.com/v2MiV8PE https://pastebin.com/v2MiV8PE [1] https://pastebin.com/RmLuGzAY https://pastebin.com/RmLuGzAY