= Dialects

A dialect is a class that provides information about the specifics of a database and translators for the SQL dialect of the database.

== Supported dialects

Hibernate supports a wide range of dialects out of the box. The following is list of officially supported databases:

* Apache Derby
* Cockroach
* Google Spanner
* H2
* HSQLDB
* IBM DB2 LUW
* IBM DB2 iSeries
* IBM DB2 z/OS
* MariaDB
* MySQL
* Oracle
* PostgreSQL
* Postgres Plus
* SAP HANA
* SQL Server
* Sybase ASE

Usually, Hibernate supports at least the database version that is also still supported by the respective vendor.
In many cases though, Hibernate supports even older versions of the databases,
but the support for these versions is not guaranteed.

Apart from the Hibernate team supported dialects, there are also community dialects.

== Community dialects

As of Hibernate 6.0, the Hibernate team decided to provide a clear way forward for community contributed dialects.
The `hibernate-core` artifact had many legacy dialects before 6.0 that were only tested and maintained on a best effort basis.

More and more database vendors requested to integrate a dialect for their database and even provided a PR with a dialect,
but the Hibernate team didn't want to add new dialects for databases that might not have a wide adoption
or any automated testing into the `hibernate-core` artifact. Even though the dialect was supposedly maintained by the vendor,
the Hibernate team was burdened with reviewing questions, issues and PRs that relate to these dialects.

To give database vendors and the community a clear way forward, the Hibernate team decided to introduce a new artifact,
called `hibernate-community-dialects` which is the new home for dialects that are maintained by vendors or individuals.
Starting with Hibernate 6.0 the `hibernate-core` artifact will only contain dialects that are supported and tested by the Hibernate team.
All the legacy dialects are moved to the `hibernate-community-dialects` artifact to have a clear separation based on the quality of the dialect.

Issues with dialects in the `hibernate-community-dialects` are usually not considered by the Hibernate team,
as the community is responsible for providing fixes and improving the dialects for newer database versions or ORM capabilities.

== Requirements for moving to hibernate-core

If a database vendor wants their database dialect to be included in the `hibernate-core` artifact,
several requirements have to be fulfilled:

* The vendor must provide access to a dedicated database server that can be used for testing
* The vendor must provide contact details to at least one employee who is mainly responsible for the maintenance of the dialect
* The responsible employee of the vendor must actively monitor and react to failures of the testsuite against the respective database
* The responsible employee of the vendor must ensure the testsuite is configured correctly in order for it to succeed on the respective database
* If the responsible employee of the vendor leaves the company, the vendor must provide contact details to a new responsible employee

In case the responsible employee is unreachable for a longer period or issues with the dialect are not attended to in a timely manner,
the Hibernate team will move the dialect back to the `hibernate-community-dialects` artifact.

The requirements for the database server are:

* JDK 8 installed through e.g. `sudo yum install -y java-1.8.0-openjdk-devel`
* JDK 11 installed through e.g. `sudo yum install -y java-11-openjdk-devel`
* Git installed through e.g. `sudo yum install -y git`
* Access to the database through non-confidential credentials
* Access via SSH through confidential credentials

Get in touch with the Hibernate team on https://hibernate.zulipchat.com/#narrow/stream/132096-hibernate-user[Zulip]
if you want to request the move of your dialect to hibernate-core.