Category: MongoDB

Using Docker to shove an existing application into some containers

I have finally got round to learning how to use Docker past the level of knowing what it is and does without ever using it. This is the first post that I have attempted to use Docker in and will probably be what I refer to whenever I start a new project (for Java or ...

A quick look into Reactive Streams with Spring Data and MongoDB

This is a short post looking into Reactive Streams and how they can be used with MongoDB and Spring Data. This post won't go into the depths of what Reactive Programming and Reactive Streams are as there have been plenty of posts covering that recently, such as What are Reactive Streams in Java and Reactive Spring ...

MongoDB Indexes with Spring Data

When working with large amounts of data the use of indexes will greatly improve the time it takes for your queries to run by storing part of a collection's data in a form that is easy to traverse. To add some indexes to your collections you could run some functions directly via the Mongo Shell or ...

Embedded documents with Spring Data and MongoDB

Continuing on from Getting started with Spring Data and MongoDB we will look at implementing embedded documents.  This allows one to one and one to many relationships to be modelled within a document and allows data to be retrieved in a singular query. Although as more relationships are modelled through extra embedded documents the write ...

Getting started with Spring Data and MongoDB

In this post we will have a look at some of the basics of using Spring Data and MongoDB. Firstly what is MongoDB? It is a NoSQL database that uses JSON-like documents which allows fields to vary between documents and have the data structure change over time. A document model maps to an object that ...