Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • JOIN Elimination: An Essential Optimiser Feature for Advanced SQL Usage
    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…Read more JOIN Eliminat...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • jOOQ 3.10 Supports JPA AttributeConverter
    One of the cooler hidden features in jOOQ is the JPADatabase, which allows for reverse engineering a pre-existing set of JPA-annotated entities to generate jOOQ code. For instance, you could write these entities here: (Just a simple example. Let’s not discuss the caveats of @ManyToMany mapping). For more info, the full example can be found…Read more jOOQ 3.10 Supports JPA AttributeConverter
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • Finding all Palindromes Contained in Strings with SQL
    SQL is a really cool language. I can write really complex business logic with this logic programming language. I was again thrilled about SQL recently, at a customer site: Writing some nifty SQL queries for a customer. Wondering why anyone would even consider using a 3GL for any business logic at all?? — Lukas Eder…Read more Finding all Palindromes Contained in Strings with SQL
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • jOOQ Tuesdays: Oliver Gierke Talks About Spring Data
    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…Read more jOOQ Tuesdays: Oliver Gierke Talks About Spring Data
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • 5 Things You May Not Have Known About jOOQ
    jOOQ has been around for a while now (since 2009!) and by now we can say we’ve seen quite a bit of things about the SQL and Java languages. Some of our design decisions are particular in the way jOOQ thinks about programming with SQL. These include: Nullability (let’s stop fighting it) Value types (let’s…Read more 5 Things You May Not Have Known About jOOQ
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • jOOQ 3.10 Supports Exciting MySQL 8.0 Features
    In recent months, there had been some really exciting news from the MySQL team: (Recursive) Common Table Expressions in MySQL Introducing Window Functions These two SQL standard language features are among the most powerful SQL features that are available from most other databases. I frequently include them in conference talks about SQL (see my article…Read more jOOQ 3.10 Supports Exciting MySQL 8...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • A Curious Java Language Feature and How it Produced a Subtle Bug
    Java’s visibility rules are tricky at times. Do you know what this will print? It will print (highlight to see the solution): B.x Because: The super type B's members hide the enclosing type C's members, which again hide the static import from A. How can this lead to bugs? The problem isn’t that the above…Read more A Curious Java Language Feature and How it Produced a Subtle Bug
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • Don’t Overdo the “Principle of Least Astonishment” Cargo Cult
    As we all agree, GOTO is evil, right? Relevant XKCD Or even funnier: New Intern Knows Best Of course, GOTO isn’t evil Of course, somewhere deep down in our professional selves, we know that GOTO isn’t evil, it’s just a very basic processor instruction that was available since the early days of assembly code. GOTO…Read more Don’t Overdo the “Principle of Least Astonishment” Cargo Cult
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • Don’t Extract Everything Into a Method
    Every now and then, I tweet something like this, just to piss off some clean coders: Call me what you want, but I like the occasional break-out-of-if pic.twitter.com/kQ0BIkijz0 — Lukas Eder
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • How I Incorrectly Fetched JDBC ResultSets. Again.
    You know JDBC, right? It’s that really easy, concise API that we love to use to work with virtually any database, relational or not. It has essentially three types that you need to care about: Connection Statement (and its subtypes) ResultSet All the other types some sort of utilities. Now, with the above three, we…Read more How I Incorrectly Fetched JDBC ResultSets. Again.
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • Are Java 8 Streams Truly Lazy? Not Completely!
    In a recent article, I’ve shown that programmers should always apply a filter first, map later strategy with streams. The example I made there was this one: In this case, the limit() operation implements the filtering, which should take place before the mapping. Several readers correctly mentioned that in this case, it doesn’t matter what…Read more Are Java 8 Streams Truly Lazy? Not Completely!
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • A Basic Programming Pattern: Filter First, Map Later
    In recent days, I’ve seen a bit too much of this: Something is very wrong with the above example. Can you see it? No? Let me rename those variables for you. Better now? Exactly. The above algorithm is O(N) when it could be O(1): (Let’s assume the lack of explicit ordering is irrelevant) I’m working…Read more A Basic Programming Pattern: Filter First, Map Later
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • ORMs Should Update “Changed” Values, Not Just “Modified” Ones
    In this article, I will establish how the SQL language and its implementations distinguish between changed values and modified values, where a changed value is a value that has been “touched”, but not necessarily modified, i.e. the value might be the same before and after the change. Many ORMs, unfortunately, either update all of a…Read more ORMs Should Update “Changed” Values, Not Just “Modified”...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • jOOQ Tuesdays: Gerald Sangudi and Keshav Murthy Reveal the Secrets of N1QL (SQL on JSON)
    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…Read more jOOQ Tuesdays: Gerald Sangudi and Keshav Murthy Reveal the Secrets of ...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • Using Kotlin’s Apply Function for Dynamic SQL with jOOQ
    It was hard to limit ourselves to 10 Nice Examples of Writing SQL in Kotlin With jOOQ, recently, because the Kotlin language has many nice little features that really help a lot when working with Java libraries. We’ve talked about the nice with() stdlib function, which allows to “import” a namespace for a local scope…Read more Using Kotlin’s Apply Function for Dynamic SQL with jOOQ
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • How to Use SQL INTERSECT to Work Around SQL’s NULL Logic
    ANOTHER SQL Post this week? I got nerd-sniped: Lazy Internet: In Oracle, how do i query for where (A, B, C) in (('a', 'b', null), 'a', null, 'c') considering Oracle's null handling? — Rafael Winterhalter (@rafaelcodes) June 2, 2017 Oooooh, challenge accepted! So, let’s assume we have a table T with columns (A, B, C)…Read more How to Use SQL INTERSECT to Work Around SQL’s NULL Logic
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • How to Find Redundant Indexes in SQL
    The following two indexes are redundant in most SQL databases: It is usually safe to drop the first index, because all queries that query the LAST_NAME column only can still profit from the second index I_ACTOR_2. The reason being that LAST_NAME is the first column of the composite index I_ACTOR_2 (it would be a different…Read more How to Find Redundant Indexes in SQL
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • How to Execute a SQL Query Only if Another SQL Query has no Results
    I stumbled upon an interesting question on Stack Overflow recently. A user wanted to query a table for a given predicate. If that predicate returns no rows, they wanted to run another query using a different predicate. Preferably in a single query. Challenge accepted! Canonical Idea: Use a Common Table Expression We’re querying the Sakila…Read more How to Execute a SQL Query Only if Another SQL Qu...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • When to Use Bind Values, and When to Use Inline Values in SQL
    Users of jOOQ, PL/SQL, T-SQL are spoiled as they hardly ever need to worry about bind values. Consider the following statements: Using jOOQ The method parameters firstName and lastName will be automatically mapped to bind values in the generated SQL statement. Here’s the debug log output when running the above, where the first statement is…Read more When to Use Bind Values, and When to Use Inline ...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • How to Generate at Least One Row in SQL
    There are some situations where you would like to have at least one (empty) row in your result set in SQL. Imagine the following situation. We’re querying the Sakila database for actors and their films: yielding something like: +------------+-----------+---------------------+ | FIRST_NAME | LAST_NAME | TITLE | +------------+-----------+---------------------+ | ... | ... | ... | |…Read more How to ...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • 10 Nice Examples of Writing SQL in Kotlin With jOOQ
    Kotlin is the next big thing. With Google announcing official support for Kotlin on Android, we’ll see a lot more traction for this lovely language. After today's #kotlin announcement, we're betting this tag will blow up just like Swift did. #io17. https://t.co/whOcJlJfWe pic.twitter.com/2QKEJIRYVi — Stack Overflow (@StackOverflow) May 17, 2017 We’ve already blogged about the…Read more 10 Nice Exa...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • 10 Tips on How to be a Great Programmer
    I was recently asked in an interview about my opinion on how to be a great programmer. That’s an interesting question, and I think we can all be great programmers, regardless of our talent, if we follow a couple of rules that – I believe – should be common sense. In fact, these rules don’t…Read more 10 Tips on How to be a Great Programmer
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • Don’t Use the String Concatenation “Trick” in SQL Predicates
    In SQL, quite often, we want to compare several values with each other. For instance, when we’re looking for a specific user by their first and last names, we’ll write a query like this one: We’re getting: CUSTOMER_ID FIRST_NAME LAST_NAME ------------------------------------ 8 SUSAN WILSON Surely, everyone agrees that this is correct and perfectly fine as…Read more Don’t Use the String Concatenati...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • How to Calculate Multiple Aggregate Functions in a Single Query
    At a customer site, I’ve recently encountered a report where a programmer needed to count quite a bit of stuff from a single table. The counts all differed in the way they used specific predicates. The report looked roughly like this (as always, I’m using the Sakila database for illustration): And then, unsurprisingly, combinations of…Read more How to Calculate Multiple Aggregate Functions in a Si...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • jOOQ Tuesdays: Richard North Makes Database Testing More Reproducible with Testcontainers
    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…Read more jOOQ Tuesdays: Richard North Makes Database Testing More Reproducible ...
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • How to Fetch Multiple Oracle Execution Plans in One Nice Query
    When looking at execution plans in Oracle, we’ll have to do several steps to be able to call the DBMS_XPLAN package functions. In fact, we have to find out the SQL_ID for a given statement first, and only then we can get its plan. I’ve blogged about this previously, here. However, thanks to lateral unnesting,…Read more How to Fetch Multiple Oracle Execution Plans in One Nice Query
Java Object Oriented Querying
Java Object Oriented Querying
Blog Post

New blog articles detected.

  • SQL IN Predicate: With IN List or With Array? Which is Faster?
    Hah! Got nerd-sniped again: http://stackoverflow.com/questions/43099226/how-to-make-jooq-to-use-arrays-in-the-in-clause/43102102 A jOOQ user was wondering why jOOQ would generate an IN list for a predicate like this: Java SQL … when in fact there could have been the following predicate being generated, instead: In the second case, there would have been only one single bind variable instead of 4, a...

Out-Market Your Competitors?

Get complete competitive insights on over 2.2 million companies to drive your marketing strategy.

Create Free Account Log in

By signing up, you agree to the Terms of Service and Privacy Policy.

Out-Market Your Competitors

Get complete competitive insights on over 2.2 million companies to drive your marketing strategy.

Create Free Account

Already a user?  Log in

By signing up, you agree to the Terms of Service and Privacy Policy.