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 […]
Parse delimited string into rows
Some time ago I had to build an integration app that would on occasion query from a SQL Server 2012 database and based on the […]
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 […]
How to achieve the LIKE IN effect in SQL Server
SQL Server does not natively support a “LIKE IN” clause. For instance the following example is not valid: Luckily there is a way to achieve […]
Remove leading zeroes from varchar
The following example shows one way how you can remove leading zeroes from a varchar column in SQL Server: Returns: