Home » Author Archives: Lukas Eder (page 5)

Author Archives: Lukas Eder

Lukas is a Java and SQL enthusiast developer. He created the Data Geekery GmbH. He is the creator of jOOQ, a comprehensive SQL library for Java, and he is blogging mostly about these three topics: Java, SQL and jOOQ.

A Subtle AutoCloseable Contract Change Between Java 7 and Java 8

java-logo

A nice feature of the Java 7 try-with-resources statement and the AutoCloseable type that was introduced to work with this statement is the fact that static code analysis tools can detect resource leaks. For instance, Eclipse: When you have the above configuration and you try running the following program, you’ll get three warnings: public static void main(String[] args) throws Exception ...

Read More »

Beware of Functional Programming in Java!

java-logo

This isn’t going to be a rant about functional programming, which is awesome. This is a warning about some practices that you are very likely going to apply to your code, which are terribly wrong!. Higher order functions are essential to functional programming, and thus, talking about them will help you be the center of attention at parties. If you’re ...

Read More »

How to Find the Longest Consecutive Series of Events in SQL

software-development-2-logo

A very interesting problem that can be solved very easily with SQL is to find consecutive series of events in a time series. But what is a consecutive series of events in a time series? Take Stack Overflow, for example. Stack Overflow has a cool reputation system that uses badges to reward certain behaviour. As a social website, they encourage ...

Read More »

How to Find the Closest Subset Sum with SQL

software-development-2-logo

I’ve stumbled upon this very interesting question on Stack Overflow, recently. Its title is: [How to] compare a number with sum of subset of numbers In this article, we’ll compare the user’s imperative approach to the extremely elegant (Oracle) SQL approach. We’ll be making use of any combination of these awesome SQL features:   Window functions FIRST and LAST functions, ...

Read More »

The Danger of Subtype Polymorphism Applied to Tuples

java-logo

Java 8 has lambdas and streams, but no tuples, which is a shame. This is why we have implemented tuples in jOOλ – Java 8’s missing parts. Tuples are really boring value type containers. Essentially, they’re just an enumeration of types like these: public class Tuple2<T1, T2> { public final T1 v1; public final T2 v2; public Tuple2(T1 v1, T2 ...

Read More »

jOOQ Tuesdays: Markus Winand is on a Modern SQL Mission

software-development-2-logo

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. We are excited to talk with Markus Winand in ...

Read More »

The 10 Most Popular DB Engines (SQL and NoSQL) in 2015

software-development-2-logo

About two years ago, we’ve published this post about the 10 most popular DB engines, where we analyzed the data published by Solid IT on their DB Ranking website. In the meantime, the Solid IT measurement system has found to be a credible source, such that the website has also been cited at Gartner, InfoWorld, and many other sources. Comparing ...

Read More »

A Beginner’s Guide to Using Java EE with jOOQ

jooq-2-logo

Java EE ships with its own persistence API: JPA. JPA is most powerful when you want to map your RDBMS entities (tables / relations) to Java entities (classes), mostly following a 1:1 mapping strategy. The idea behind this is that often, business logic isn’t really set-oriented as relational algebra or SQL, but record-oriented, meaning that business rules and business logic ...

Read More »

How to Quickly Enumerate Indexes in Oracle 11gR2

software-development-2-logo

Do you want to know real quick what kind of indexes there are on any given table in your Oracle schema? Nothing simpler than that. Just run the following query: SELECT i.index_name, listagg(c.column_name, ', ') WITHIN GROUP (ORDER BY c.column_position) AS columns FROM all_indexes i JOIN all_ind_columns c ON i.index_name = c.index_name WHERE i.table_name = 'FILM_ACTOR' GROUP BY i.index_name The ...

Read More »

You Probably don’t Use SQL INTERSECT or EXCEPT Often Enough

software-development-2-logo

When people talk about SQL JOIN, they often use Venn Diagrams to illustrate inclusion and exclusion of the two joined sets: While these Venn diagrams are certainly useful to understand (and remember) SQL JOIN syntax, they’re not entirely accurate, because SQL JOIN is a special type of a cartesian product, the CROSS JOIN. In a cartesian product between two sets ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns