How to Create a Range From 1 to 10 in SQL

How do you create a range from 1 to 10 in SQL? Have you ever thought about it? This is such an easy problem to solve in any imperative language, it's ridiculous. Take Java (or C, whatever) for instance: for (int i = 1; i <= 10; i++) System.out.println(i); This was easy, right? Things even … Continue reading How to Create a Range From 1 to 10 in SQL

Faster SQL Pagination with Keysets, Continued

A while ago, I have blogged about how to perform keyset pagination (some also call this the "seek method"). Keyset pagination is a very powerful technique to perform constant-time pagination also on very large result sets, where "classic" OFFSET pagination will inevitably get slow on large page numbers. Keyset pagination is most useful for lazy … Continue reading Faster SQL Pagination with Keysets, Continued

Where’s the Self-Confidence when Advertising Java 8, Oracle?

I have often wondered, why the team around Brian Goetz has been heading towards a “decent compromise” so strongly from the beginning, both from a marketing AND technical point of view, instead of adding more boldness to how Java 8 is advertised. At Devoxx Belgium 2013, Brian Goetz seems to have really sold his accomplishments … Continue reading Where’s the Self-Confidence when Advertising Java 8, Oracle?

A History of Databases in “No-tation”

We're heading towards very exciting times in the field of databases! At Topconf in beautiful Tallin, Estonia, Nikita Ivanov (founder and CEO of GridGain Systems) was talking about how the ever crumbling price of DRAM gets in-memory computing and thus in-memory databases within the reach of being affordable by even small and medium enterprises. Nikita … Continue reading A History of Databases in “No-tation”

Popular ORMs Don’t do SQL

I'm contemplating about what has happened in the ISO / IEC SQL standard during the last 15 years. We've had quite a few new features added to our beloved SQL language. Check this out: With the ISO/IEC SQL:1999 standard, we could take advantage of grouping sets and (recursive) common table expressions. With the ISO/IEC SQL:2003 standard, we’ve … Continue reading Popular ORMs Don’t do SQL

Oracle GlassFish, or Why You Should Think About Open Source Again

Oracle's recent announcement about the discontinuation of commercial services for JEE's reference implementation GlassFish has caused many reactions in the community involved with JEE. The reactions reach from: Markus Eisele's rather pessimistic outlook on JEE's future in general Adam Bien's constructive (or cynical? With Adam Bien, you can never be sure) suggestions of moving GlassFish … Continue reading Oracle GlassFish, or Why You Should Think About Open Source Again

ID Lists Aren’t the Best Solution for the N+1 Problem

In their eternal attempts to circumvent the N+1 problem, Hibernate users often resort to IN predicates with ID lists. In this post, we'll see how those users might just be replacing a horrible thing with a bad one, which is better but not yet good. Here's why: The N+1 Problem The N+1 problem is a … Continue reading ID Lists Aren’t the Best Solution for the N+1 Problem

Using SQL Injection Vulnerabilities to Dump Your Database

The threat caused by SQL injection is heavily underestimated even by many senior developers and software architects. Most people are unaware of the fact that an entire server can be at risk by a single vulnerability even in the remotest piece of logic. This article will give a frightening insight into the potential severity of … Continue reading Using SQL Injection Vulnerabilities to Dump Your Database

Probably the Coolest SQL Feature: Window Functions

Once you get a hang of the very peculiar syntax, SQL is a highly expressive and rich language offering incredible features at a declarative level. One of the coolest features are window functions, whose coolness is in no proportion to their incredibly low popularity. The low popularity can only be due to developers being oblivious … Continue reading Probably the Coolest SQL Feature: Window Functions

Top 10 Lists of Common Java Mistakes (That Makes Top 100!)

Top 10 lists are very popular, fun, and informative to read. But there are so many of them! How to choose the right one? Here's a meta top 10 list helping you find the top 10 top 10 lists. On a more geeky note: SELECT TOP 10 mistake FROM source1 UNION ALL SELECT TOP 10 … Continue reading Top 10 Lists of Common Java Mistakes (That Makes Top 100!)