Posts tagged "mongodb"

Found 6 posts tagged mongodb
2020-07-06
Let's say you have these documents in your collection items:
2020-07-06
I would like to extract statistics about sub-documents in a collection. E.g. in the form of count, sum and average for each field Let's say you have the following documents in the items collection: js db.items.find() { "_id" : ObjectId("5f034ce90b15686f5d78baed"), "subDocument" : { "field1" : 42, "field3" : 10 } } { "_id" : ObjectId("5f034ce90b15686f5d78baee"), "subDocument" : { "field2" : 14, "field3" : 6 } } { "_id" : ObjectId("5f034ce90b15686f5d78baef"), "subDocument" : { "field1" : 6, "field4" : 11 } } { "_id" : ObjectId("5f034cea0b15686f5d78baf0"), "subDocument" : { "field3" : 3, "field4" : 26 } } How would you solve the use-case of aggregating each field of the subDocument's dynamically? Event without actually "knowing" which fields are contained in subDocument?
2020-05-26
As cited on the official release notes: > To upgrade an existing MongoDB deployment to 4.2, you must be running a 4.0-series release. So, a little bit of context: Let's say you are currently running on version 3.6. You want to upgrade to the latest version. You would be inclined to directly upgrade from 3.6 to 4.2. Not so fast.
2019-07-16

Do you need to upgrade from MongoDB version 3.4 / 3.6 to version 4.0 ?

2015-07-05
2014-03-04
Let's take a simple example: a TicTacToe gamefield saved as a nested array in MongoDB. In the Collection a gamefield document has the following structure: