• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

jOOQ is the Best and an Increasingly Popular Way to Write SQL in Java

Ranch Hand
Posts: 50
Oracle Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why is jOOQ becoming increasingly popular in the Java ecosystem?

Java and SQL are both very popular languages in enterprise software development. Yet, the only standard interface between the two is JDBC, which is agreed by many programmers to be a very awkward, stateful and verbose API. Being low-level, it covers (almost) complete access to all SQL standard and vendor-specific SQL functionality, but client code is tedious to write, string-based, and thus, error-prone.

Other alternative standards (JPA and JDO) mostly hide SQL from their clients. While they ease the pain for writing CRUD, querying may become very difficult or slow.

jOOQ is a true and increasingly popular Open Source alternative to the Java standards, where users want to embed typesafe SQL as an internal domain-specific language directly into their Java code. The Java compiler can infer a lot of SQL syntax, metamodel and data type typesafety for you via jOOQ's unique fluent API technique and row value expression typesafety.

These are typical SQL statements

... and this is how they translate to jOOQ


  • ... models a large subset of the SQL language in Java
  • ... translates functions and SQL clauses into equivalent SQL, if not supported by your database
  • ... executes your SQL and lets you transform flat result sets into your own domain model
  • ... ships with a code-generator which generates typesafe artefacts from your database meta data
  • ... allows for typesafely embedding your stored functions in SQL expressions

  • And much more. See more of jOOQ in the jOOQ tutorial. You will see that there is no better way to embed SQL into the Java language, than by using jOOQ
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
      Bookmark Topic Watch Topic
    • New Topic