JOOQ vs Hibernate [closed] JOOQ vs Hibernate [closed] sql sql

JOOQ vs Hibernate [closed]


While jOOQ and Hibernate compete for the same target audience, they do not solve the same problem at all. You've already linked this article in your question. The essence of it is simple:

  • Are you going to solve object graph persistence problems? Use an ORM (e.g. Hibernate)
  • Are you going to embed SQL into Java? Use SQL (e.g. jOOQ)

Of course, since both APIs cover accessing relational databases, they overlap in functionality to a certain extent. E.g. Hibernate also supports simple querying, while jOOQ also supports simple mapping.

While we should avoid delving into subjective discussions about whether object graph persistence or SQL is a better approach at interacting with your database, I think the above is a pretty objective answer to what API is better suited, once you've made the subjective decision.

AND: You can use both, e.g. ORM/Hibernate for CRUD, SQL/jOOQ for reporting.

(Disclaimer: I work for the company behind jOOQ, so this answer is biased)