Category Archives: ORM

Hibernate : SQL Dialects List


Hibernate supports many databases, by using dialect (hibernate.dialect) property in hibernate generates the appropriate SQL for the selected database. This idea makes us to develop database vendor independent application so that if you switch to another application just change dialect only.

Define dialect : Below is example of dialect for H2 database you can use according to your database.

In hibernate.cfg.xml

<property>
         org.hibernate.dialect.H2Dialect
</property>

In application.properties with Spring boot + JPA

spring.jpa.database-platform=org.hibernate.dialect.H2Dialect

List of Hibernate SQL Dialects

Following is the lists of Dialects provided by hibernate to connect different databases:

Note : Click on database name link to know method of hibernate dialect methods.

RDBMS DIALECT
Cache 71 org.hibernate.dialect.Cache71Dialect
DB2 org.hibernate.dialect.DB2Dialect
DB2 AS/400 org.hibernate.dialect.DB2400Dialect
DB2 OS390 org.hibernate.dialect.DB2390Dialect
Derby org.hibernate.dialect.DerbyDialect
Firebird org.hibernate.dialect.FirebirdDialect
FrontBase org.hibernate.dialect.FrontbaseDialect
H2 Database org.hibernate.dialect.H2Dialect
HypersonicSQL org.hibernate.dialect.HSQLDialect
Informix org.hibernate.dialect.InformixDialect
Interbase org.hibernate.dialect.InterbaseDialect
Ingres org.hibernate.dialect.IngresDialect
Ingres 9 org.hibernate.dialect.Ingres9Dialect
Ingres 10 org.hibernate.dialect.Ingres10Dialect
JData Store org.hibernate.dialect.JDataStoreDialect
Mckoi SQL org.hibernate.dialect.MckoiDialect
Microsoft SQL Server 2000 org.hibernate.dialect.SQLServerDialect
Microsoft SQL Server 2005 org.hibernate.dialect.SQLServer2005Dialect
Microsoft SQL Server 2008 org.hibernate.dialect.SQLServer2008Dialect
MySQL 5 org.hibernate.dialect.MySQLDialect
MySQL with InnoDB org.hibernate.dialect.MySQLInnoDBDialect
MySQL with MyISAM org.hibernate.dialect.MySQLMyISAMDialect
Mimer SQL org.hibernate.dialect.MimerSQLDialect
Oracle (any version) org.hibernate.dialect.OracleDialect
Oracle 8 org.hibernate.dialect.OracleDialect
Oracle 9i org.hibernate.dialect.Oracle9Dialect
Oracle 10g org.hibernate.dialect.Oracle10Dialect
Oracle 11g org.hibernate.dialect.Oracle10Dialect
Pointbase org.hibernate.dialect.PointbaseDialect
PostgreSQL org.hibernate.dialect.PostgreSQLDialect
PostgreSQL 8.1 org.hibernate.dialect.PostgreSQL81Dialect
PostgreSQL 8.2 org.hibernate.dialect.PostgreSQL82Dialect
PostgrePlus org.hibernate.dialect.PostgresPlusDialect
Progress org.hibernate.dialect.ProgressDialect
RDMSOD 2200 org.hibernate.dialect.RDMSOS2200Dialect
SAP DB org.hibernate.dialect.SAPDBDialect
Sybase org.hibernate.dialect.SybaseDialect
Sybase Anywhere org.hibernate.dialect.SybaseAnywhereDialect
Sybase ASE 15.5 org.hibernate.dialect.SybaseASE15Dialect
Sybase ASE 15.7 org.hibernate.dialect.SybaseASE157Dialect
Tera Data org.hibernate.dialect.TeradataDialect
Times Ten org.hibernate.dialect.TimesTenDialect

Note: This is not mandatory to be given in hibernate.cfg.xml file.

References

Advertisements