Anything you store in MongoDB’s GridFS is stored in 2 collections. For instance if your files are loaded in a GridFS bucket called ‘images’ you […]
Compile and install MongoDB on Raspberry PI
A 32 bit version of Raspbian is currently the most common OS that runs on a Raspberry PI. RPI 3 comes equipped with a 64 […]
Join Array in MongoDB
Since version 3.2 you can use the $lookup to perform the equivalent of left outer joins in MongoDB. While you should try to design your […]
When to use MongoDB $and Operator
On the surface, it seems like the $and operator is useless because it is implicitly applied when MongoDB processes each expression in the query. For […]
MongoDB Aggregation to Custom Sort
While the MongoDB Aggregation Pipeline can be used to aggregate your data, it is definitely not limited to that and can be used to construct […]
MongoDB ClassCastException with new GridFS API
Starting with the MongoDB Java API 3.1 a new GridFS API has been added. It is available under the com.mongodb.client.gridfs package. If you are building […]
Join Query in MongoDB
As a general rule, you should try to avoid joining as much as possible in MongoDB. While in traditional relational databases you try to avoid […]