3 ms·
Thanks! > What is the simplest tool to do the job? For me it's definitely MongoDB but I'm afraid of data loss etc. My example was simplified. In reality I wan
by Kiro 10y ago
Thanks!
> What is the simplest tool to do the job?
For me it's definitely MongoDB but I'm afraid of data loss etc. My example was simplified. In reality I want to update a sub-array within the collection, like this: collection['some_identifier']['items'][3] = 123. Overwriting the whole 'some_identifier' document seems wasteful. With MongoDB it's easy though to update nested sub-data.
- elmigranto 10y agoIf you ever only need to read or update single document in a single collection, Mongo's fine. When you need anything more (which is probably "soon" if not "already"), it'll bite one way or the other.
- threeseed 10y agoThis absolutely isn't true. If you batch operations it is extremely fast at updates across multiple documents.
- elmigranto 10y agoPoor wording on my part. My point isn't about performance, it's about API. Other than selecting documents from single collection (.find), Mongo's queries are shockingly wierd and inconsistent to me. Compare aggregation framework to what SQL has, for example: https://docs.mongodb.com/manual/reference/sql-aggregation-comparison/ https://docs.mongodb.com/manual/reference/sql-aggregation-co... Or even within Mongo, querying and aggregating are astonishingly different things, that you need to learn separately. And then there are JOINS. And stale reads with other serialization issues.