Speaking of NoSQL vs RDBMS, I'm currently maintain...
# random
a
Speaking of NoSQL vs RDBMS, I'm currently maintaining a Mongo backend for a staffing service (people getting hired to do tasks), and I've been slightly frustrated with a couple of things, like having to use relatively complex and slow aggregations with for what I'd normally think should be a simple lookup (e.g. join 2-3 collections, apply a few filters, plus paging the results). Mongo was probably initially chosen to speed up development due to not having an explicit schema, but what I'm wondering is - is this a sign that an RDBMS would have been a better option, or am I just cooking Mongo wrong? Admittedly it did get a lot of useful features over the years...
k
Sounds like possibly a schema issue. MongoDB works best when the data is denormalized and the documents are very similar to what you need to display. And you have to index is properly as well.
👍 3
t
Yup, if you actually have a need for relations and transactions with things not on your document, then Mongo is not the thing for you.
But it does fit well with this DDD and Aggregates stuff. since you shouldn't have to update more that one aggregate. and with CQRS you should have a different read and write models. But DDD and/or CQRS shouldn't be applied to everything when a simple CRUD is all you need.
👍 1