Typesafe SQL query builder and code generator for Java
open coreApache-2.0free
jOOQ is a Java library that generates Java code from your database schema and lets you write typesafe SQL through a fluent API, as an alternative to an ORM that drives the database model. It supports many SQL dialects. The Open Source Edition is free under the Apache License 2.0 for open source databases such as PostgreSQL, MySQL, MariaDB, SQLite and DuckDB; commercial editions add Oracle, SQL Server and other commercial databases, older database versions and support. It's made by Data Geekery.
Problems it solves
- I want typesafe SQL in Java instead of string queries
- Hibernate hides my SQL and I want to write real SQL with compile-time checks
- How do I generate Java classes from my PostgreSQL schema
- I need a SQL query builder for Kotlin or Java that supports Oracle
Features
- Write typesafe SQL in Java with a fluent query builder API
- Generates Java classes from your database schema (database first)
- Supports many SQL dialects, from PostgreSQL and MySQL to Oracle and SQL Server
- Free Open Source Edition for open source databases
- Commercial editions for commercial databases, older database versions and support
Ways to run it
jOOQ Open Source Edition
free1
Not included
- commercial databases such as Oracle and SQL Server
- older database versions
- support
jOOQ Express Edition
€99 per developer workstation a year, excluding VAT1
Only in this edition
- Oracle Express, SQL Server Express and Microsoft Access
- basic support
jOOQ Professional Edition
€399 per developer workstation a year, excluding VAT1
Only in this edition
- all editions of Oracle and SQL Server
- Amazon Redshift, Aurora, Azure SQL and CockroachDB
- older database versions
jOOQ Enterprise Edition
€799 per developer workstation a year, excluding VAT1
Only in this edition
- enterprise databases such as DB2, HANA, Snowflake, BigQuery and Sybase
- premium support
Alternatives
The same job
These do what jOOQ does.
- Exposed The SQL library for Kotlin
- sqlc Compile SQL to type-safe code
- MyBatis SQL mapper persistence framework for Java
- Hibernate ORM Idiomatic persistence for Java and relational databases
- Slick Functional Relational Mapping for Scala
