~/devreads

#db2

7 posts

11 May 2022

lukaseder 1 min read

An interesting hint by Vladimir Sitnikov has made me think about a new benchmark for jOOQ: The benchmark should check whether single row queries should have a JDBC Statement.setFetchSize(1) call made to them by default. The Javadoc of the method says: Gives the JDBC driver a hint as to the number of rows that should … Continue reading Setting the…

jooq-developmentsqldb2fetch sizefetchsize

25 Aug 2021

lukaseder 1 min read

One of the strengths of modern RDBMS is the capability to mix the powerful SQL language with procedural code. SQL is a 4th generation programming language (4GL), and as such, extremely well suited for querying and bulk data manipulation. Its functional-declarative nature allows for it to be optimised in highly efficient ways using cost-based optimisation, … Continue reading Vendor Agnostic,…

jooq-in-use3gl4gldb2firebird

6 Jul 2021

lukaseder 1 min read

This is how SQL should have been used all along. They called it The Third Manifesto, ORDBMS, or other things. Regrettably, it never really took off. Because most vendors didn’t adopt it. And those who did, didn’t agree on syntax. But this is about to change. Thanks to the now ubiquitous SQL/JSON support (which jOOQ … Continue reading jOOQ 3.15’s…

jooq-developmentdb2javajooqjson

10 Sept 2020

lukaseder 1 min read

I was asked a very interesting question on Twitter just now: @lukaseder quick q: in pg can I have a composite foreign key where one value is a constant… or do I have to store the constant in the table? constraint foreign key (foo_id, ‘bar_subtype’) references foo(foo_id,foo_type) ? — Look! The Emperor is NAKED V⃝ … Continue reading Having “constant”…

sqlcomputed columndb2generated always asgenerated column

5 May 2020

lukaseder 1 min read

SQL Server supports transforming flat tabular SQL result sets into hierarchical structures by convention using the convenient FOR XML or FOR JSON syntaxes. This is really convenient and less verbose than the standard SQL/XML or SQL/JSON APIs – although the standard ones are more powerful. In this blog post, I’d like to show a few … Continue reading Using SQL…

jooq-developmentsqldb2jsonmariadb

1 Sept 2017

lukaseder 1 min read

The SQL language has one great advantage over procedural, object oriented, and “ordinary” functional programming languages. The fact that it is truly declarative (i.e. a 4GL / fourth generation programming language) means that a sophisticated optimiser can easily transform one SQL expression into another, equivalent SQL expression, which might be faster to execute. How does … Continue reading JOIN Elimination:…

sqldb2join eliminationmysqloptimisation

16 Feb 2016

lukaseder 1 min read

Welcome to the jOOQ Tuesdays series. In this series, we’ll publish an article on the third Tuesday every other month where we interview someone we find exciting in our industry from a jOOQ perspective. This includes people who work with SQL, Java, Open Source, and a variety of other related topics. I’m very excited to … Continue reading jOOQ Tuesdays:…

jooq-tuesdaysdb2glenn paulleyhanaibm