3 ms·
Is Mongo better than it’s reputation of years ago? My main concern is it might be tricky to make secure. The other is foreign keys. I have used Firebase (also n
by quickthrower2 3y ago
Is Mongo better than it’s reputation of years ago? My main concern is it might be tricky to make secure. The other is foreign keys. I have used Firebase (also nosql) and that was a bit tricky in regards to when things need to be joined.
- theogravity 3y agoAs someone who have dealt with it in the past two years, no. If you want to do complex queries (aggregations), it's a huge pain in the ass to do, reason about, and also troubleshoot. Simple things in SQL like joins are more painful to reason about in mongo. Then there's these gotchas, like if you want to do a join using the $lookup operator, then you need to be aware that indices may not apply in certain situations. On the driver side, the mongo node client has a really convoluted way of performing transactions that it is really easy to screw up where it looks like you're writing your transaction properly, but it actually doesn't get treated like one (did you remember to finalize the transaction session? did you make sure to pass the session handle to every single mongo callout you're making, etc) If you want something like trigram searches, you'll have to pay for Mongo Atlas, their hosted mongo product; otherwise, you're stuck with a simple fulltext index.