Java SQL

Open-source Java projects categorized as SQL

Top 23 Java SQL Projects

  • dbeaver

    Free universal database tool and SQL client

    Project mention: newly started using dbeaver | | 2022-11-25
  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.

  • MyBatis

    MyBatis SQL mapper framework for Java

    Project mention: MyBatis VS jOOQ - a user suggested alternative | | 2022-11-25
  • shardingsphere

    Ecosystem to transform any database into a distributed database system, and enhance it with sharding, elastic scaling, encryption features & more

    Project mention: ShardingSphere 5.3.0 is released: new features and improvements | | 2022-12-11

    🔗 Release Notes

  • Presto

    The official home of the Presto distributed SQL query engine for big data

    Project mention: Cheat sheet for quotes usage? | | 2023-01-21

    I look at the grammar. Here is preto's grammar which is mostly similar to other sql engines:

  • QuestDB

    An open source time-series database for fast ingest and SQL queries

    Project mention: any opinion good or bed about a code that smells? | | 2023-01-28

    The Java API implementation is problematic due to over allocating which results in a great deal of overhead. Projects like QuestDB don't use the Java API much to reduce GC thrashing. It results in a DB that outperforms C++ counterparts.

  • Trino

    Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (

    Project mention: Uber Interview Experience/Asking Suggestions | | 2023-02-01

    One place to look are the projects repo's and docs, once you have a good idea of how the system is architected poking around pieces of the codebase can be helpful in letting you really understand their internals. I personally enjoy going through spark repo and trino repo and the documentation for both projects is decent and can answer many of your questions.

  • Sonar

    Write Clean Java Code. Always.. Sonar helps you commit clean code every time. With over 600 unique rules to find Java bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.

  • Flyway

    Flyway by Redgate • Database Migrations Made Easy.

    Project mention: Ask HN: How do you test SQL? | | 2023-01-31
  • doris

    Apache Doris is an easy-to-use, high performance and unified analytics database.

    Project mention: Apache Doris Roadmap 2023 | | 2023-02-03
  • beam

    Apache Beam is a unified programming model for Batch and Streaming data processing.

    Project mention: Real Time Data Infra Stack | | 2022-12-04

    Apache Beam: Streaming framework which can be run on several runner such as Apache Flink and GCP Dataflow

  • ksql

    The database purpose-built for stream processing applications.

    Project mention: The Next Generation of Materialize | | 2022-10-03
  • jOOQ

    jOOQ is the best way to write SQL in Java

    Project mention: You might not need an ORM | | 2023-01-25

    > all I really want is a nice API for building queries (that actually supports all underlying database features) and automatic mapping of the results to whatever objects/structs and primitives the language supports.

    For Java based solutions, check out or

  • Apache Hive

    Apache Hive

    Project mention: In One Minute : Hadoop | | 2022-11-21

    Hive, A data warehouse infrastructure that provides data summarization and ad hoc querying.

  • OrientDB

    OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.

    Project mention: Database of Databases | | 2022-06-23


  • Apache Ignite

    Apache Ignite (by apache)

    Project mention: Ask HN: P2P Databases? | | 2022-03-01

    Ignite works as you describe:

    I wouldn't really recommend this approach, I would think more in terms of subscriptions and topics and less of a 'database'.

  • JSqlParser

    JSqlParser parses an SQL statement and translate it into a hierarchy of Java classes. The generated hierarchy can be navigated using the Visitor Pattern

    Project mention: Semantic Diff for SQL | | 2022-07-29

    I wonder if this is a topical thread to check if anyone is aware of a Java based solution to parse a CREATE VIEW statement to get a mapping between the view columns and the corresponding source table columns. I checked out jsqlparser[0] and it does produce an AST which can be parsed using the visitor-pattern[1] but was wondering if there is a more "out-of-the-box" solution. Due to various reasons, querying the database information schema is not an option I can pursue.



  • starrocks

    StarRocks is a next-gen sub-second MPP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics and ad-hoc query.

    Project mention: Anyone using StarRocks DB instead of ClickHouse? | | 2022-11-17
  • liquibase

    Main Liquibase Source

    Project mention: Schema vs non-schema prpgramming | | 2023-01-15

    Highly recommend you use either Liquibase or Flyway for schema management, and Testcontainers pg to run a transitive database for your tests.

  • Apache Calcite

    Apache Calcite

    Project mention: Want to contribute more to open source projects. | | 2022-08-18
  • Crate

    CrateDB is a distributed SQL database that makes it simple to store and analyze massive amounts of data in real-time. Built on top of Lucene.

    Project mention: Distributed query execution in CrateDB: What you need to know | | 2022-07-20

    A logical execution plan does not take into account the information about data distribution. CrateDB is a distributed database and data is sharded: a table can be split into many parts - so-called shards. Shards can be independently replicated and moved from one node to another. The number of shards a table can have is specified at the time the table is created.

  • H2

    H2 is an embeddable RDBMS written in Java.

    Project mention: SQLite Internals: How the Most Used Database Works | | 2022-12-19

    > ...than it would be to learn the exact syntax and quirks and possibly bugs of someone else's implementation...

    Yup. Also, having deep knowledge of the language is required.

    SQLite's grammar is neat. Creating a compatible parser would make a fun project. Here's a pretty good example: (Actual ANTLR 4 grammar: )

    Postgres, which tries to be compliant with the latest standards, however...

    SQL-2016 is a beast. Not to mention all the dialects.

    I'm updating my personal (soon to be FOSS) grammar from ANTLR 3 LL(k) to ANTLR 4 ALL().

    I've long had a working knowledge of SQL-92, with some SQL-1999 (eg common table expressions).

    But the new structures and extensions are a bit overwhelming.

    Fortunately, ANTLR project has ~dozen FOSS grammars to learn from.

    They mostly mechanically translate BNFs to LL(k) with some ALL(). Meaning few take advantage of left-recursion.

    Honestly, I struggled to understand these grammars. Plus, not being conversant with the SQL-2016 was a huge impediment. Just finding a succinct corbis of test cases was a huge hurdle for me.

    Fortunately, the H2 Database project is a great resource.

    Now for the exciting conclusion...

    My ANTLR grammar which passes all of H2's tests looks nothing like any of the official or product specific BNFs.

    Further, I found discrepancy between the product specific BNFs and their implementations.

    So a lot of trial & error is required for a "real world" parser. Which would explain why the professional SQL parsing tools charge money.

    I still think creating a parser for SQLite is a great project.

  • spotless

    Keep your code spotless

    Project mention: Programming Breakthroughs We Need | | 2022-08-17

    Some code formatters such as Spotless ( allow you to format code only in files that have changes against some designated branch such as `master`. So, you check out your feature branch, make changes, do some commits, and run spotless. Only the files which have some changes between your workspace and the master branch will be formatted. This allows you to gradually format the project as and when files would be changed anyways.

  • requery

    requery - modern SQL based query & persistence for Java / Kotlin / Android

    Project mention: Learning Android’s Room Database Made Easy | | 2023-01-22

    ah, I was thinking of but I wasn't really sure, also that project is dead oh no :D

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-02-03.

Java SQL related posts


What are some of the best open-source SQL projects in Java? This list will help you:

Project Stars
1 dbeaver 30,198
2 Apache Flink 20,540
3 MyBatis 18,113
4 shardingsphere 17,886
5 Presto 14,409
6 QuestDB 10,028
7 Trino 7,111
8 Flyway 6,966
9 doris 6,886
10 beam 6,367
11 ksql 5,383
12 jOOQ 5,284
13 Apache Hive 4,632
14 OrientDB 4,557
15 Apache Ignite 4,371
16 JSqlParser 4,129
17 starrocks 3,863
18 liquibase 3,660
19 Apache Calcite 3,620
20 Crate 3,592
21 H2 3,589
22 spotless 3,215
23 requery 3,115
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives