Using UNPIVOT to Traverse a Configuration Table’s Rows and Columns

Imagine you have a configuration table like the following: CREATE TABLE rule ( name VARCHAR2(50) NOT NULL PRIMARY KEY, enabled NUMBER(1) DEFAULT 1 NOT NULL CHECK (enabled IN (0,1)), priority NUMBER(10) DEFAULT 0 NOT NULL, flag1 NUMBER(3) DEFAULT 0 NOT NULL, flag2 NUMBER(3) DEFAULT 0 NOT NULL, flag3 NUMBER(3) DEFAULT 0 NOT NULL, flag4 NUMBER(3) … Continue reading Using UNPIVOT to Traverse a Configuration Table’s Rows and Columns

Oracle’s OFFSET .. FETCH Can be Slower than Classic ROWNUM Filtering

One of Oracle 12c's coolest features was the introduction of the SQL standard OFFSET .. FETCH clause, as we can now write things like: SELECT * FROM film ORDER BY film_id FETCH FIRST 1 ROW ONLY This is querying the Sakila database. Most other databases had this clause (or a non-standard version of it) for … Continue reading Oracle’s OFFSET .. FETCH Can be Slower than Classic ROWNUM Filtering

How to Patch Your IDE to Fix an Urgent Bug

Clock's ticking. JDK 11 will remove a bunch of deprecated modules through JEP 320, which includes the Java EE modules, which again includes JAXB, a dependency of many libraries, including jOOQ. Thus far, few people have upgraded to Java 9 or 10, as these aren't LTS releases. Unlike in the old days, however, people will … Continue reading How to Patch Your IDE to Fix an Urgent Bug

jOOQ 3.11 Released With 4 New Databases, Implicit Joins, Diagnostics, and Much More

Today, jOOQ 3.11 has been released with support for 4 new databases, implicit joins, diagnostics, and much more New Databases Supported At last, 4 new SQL dialects have been added to jOOQ! These are: jOOQ Professional Edition Aurora MySQL Edition Aurora PostgreSQL Edition Azure SQL Data Warehouse jOOQ Enterprise Edition Teradata Implicit Joins One of … Continue reading jOOQ 3.11 Released With 4 New Databases, Implicit Joins, Diagnostics, and Much More

Truth First, or Why You Should Mostly Implement Database First Designs

In this much overdue article, I will explain why I think that in almost all cases, you should implement a "database first" design in your application's data models, rather than a "Java first" design (or whatever your client language is), the latter approach leading to a long road of pain and suffering, once your project … Continue reading Truth First, or Why You Should Mostly Implement Database First Designs