Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Database centric applications with Spring Boot and jOOQ

Important: The commits and commit messages have been written very carefully to guide you through reading this project and understanding the talk. Please take your time to study them if you don't understand something.


The slides are inside this repository and also on Speakerdeck:

Datenbankzentrische Anwendungen mit Spring Boot und jOOQ

Series of blog posts

I have created a series of blog posts around this project, make sure to check them out:

  1. Database centric applications with Spring Boot and jOOQ
  2. Create a Oracle Database Docker container for your Spring Boot + jOOQ application
  3. Take control of your development databases evolution
  4. An HTTP api for analytic queries
  5. Oracle JET: JavaScript components for mere mortals?

Those posts cover the talk and the project in great detail. Please provide feedback and a star, if you like them.

Talk at DOAG 2016

Note: The talk and the slides are in German as DOAG con is a German conference, the demo, the readme and other artifacts inside this repo are in English in hope they are useful to a broader audience.

This repository contains the talk, including my notes and the complete demo, I've created for DOAG Konferenz + Ausstellung in Nürnberg.

The basic idea of this demo is to create a "cloud native" app based on Spring Boot and then using jOOQ as "database first", SQL-centric approach to your database.

Functional wise the application deals with a simple database model storing the names, artists, genres and albums of tracks I listened to the last years. Those data in full comes from my daily foto project Daily Fratze that I've been running this year for more than 12 years.

The application demonstrates the value of jOOQ when it comes to analysis of data, an area for which ORMs like hibernate weren't designed (see comment by Gavin King on "What ORMs have taught me: just learn SQL". If you just deal with simple inserts, updates and deletes during OLTP, you're mostly fine using ORMs like JPA, even problems like the n+1 query problems are known and often solved.

But if you want to use modern sql and "the index", to use powerful, analytic functions or if you have to deal with a database model that is a less than optimal fit for an ORM, than jOOQ will help you.

Sample requests

Part of the application is in actual use (the schema and some of the queries) at Daily Fratze. You can implement your own scrobble application. This version supports the following requests for now

## Get all artists
curl -X "GET" ""
## Get top n albums by some artists
curl -X "GET" ",86/topNAlbums"
## Get top n tracks by some artists Duplicate
curl -X "GET" ",86/topNTracks"
## Get cumulative plays by some artists
curl -X "GET" ",86/cumulativePlays"
## Get charts for a month
curl -X "GET" ""

Creating and running the demo database

As DOAG Konferenz is an Oracle database centric conference, I used Oracle throughout the demo and prepared some docker scripts to get you up and running quickly.

  1. Go to and install docker on your machine
  2. Download Oracle Database 12c Release 2 Standard Edition 2 for Linux
  3. Go to Oracles docker images repository, download the OracleDatabase scripts and follow the instructions. Remember to add the two files from step 2 to "dockerfiles/". I used the following command: ./ -v -s
  4. Then, inside this repository, create a running container of this image with mvn docker:start. The first start will take a while. The reason behind this is that the Oracle database files are created during the first start and not during image creation. The files are storted inside ${project.basedir}/var. There's a timeout of 30 minutes. You may have to change this if you are on a slower machine
  5. The container exposes the following ports to localhost: 1521, 5500 and 5501. The first for SQL*Plus, the later ones for the Oracle Enterprise Manager

You can access the Enterprise manager express for the root container at https://localhost:5500/em and the container ORCLPDB1 at https://localhost:5501/em.

Use SQL*Plus to interact with the database. The admin password is a password generated during first startup and you can find it inside the container logs. The doag2016 account can be used with sqlplus doag2016/doag2016@//localhost:1521/ORCLPDB1, the password is doag2016, too.

Configuring the Oracle Maven Repository

This demo uses the Oracle JDBC driver from the official Oracle Maven Repository under those coordinates:


Please follow those instructions from Oracle to make this work for your Maven installation.

Installing jOOQ Pro

This demo uses an Oracle Standard Edition 2 database, so it needs a jOOQ Professional edition to run. You can get a free, 30 days trial edition here: jOOQ Download.



Creative Commons Lizenzvertrag
"Database centric applications with Spring Boot and jOOQ" von Michael J. Simons ist lizenziert unter einer Creative Commons Namensnennung - Nicht-kommerziell - Weitergabe unter gleichen Bedingungen 4.0 International Lizenz.


  • "Relentless Persistence": © Curtis Lassam, Cube Drone
  • "Electronic data": ©
  • "Magnet und Blanko-Kühlschrank": ©
  • "Oracle Databases": Public Domain
  • "Young men with tablet": ©