Friday, December 25, 2009

Section C.1. Getting Fluent in the Local SQL








Appendix C. Hibernate SQL Dialects


Getting Fluent in the Local SQL




C.1. Getting Fluent in the Local SQL


Hibernate ships with detailed support for many[11] commercial and free relational databases. While
most features will work properly without doing so, it's
important to set the hibernate.dialect configuration
property to the right subclass of org.hibernate.dialect.Dialect, especially
if you want to use features like <native>
or <sequence> primary key generation or
session locking. Choosing a dialect is also a very convenient way of
setting up a whole raft of Hibernate configuration parameters you'd
otherwise have to deal with individually.

[11] I never expected to bump into Caché again, having left the world
of health care software to work in Java….


Database systemAppropriate hibernate.dialect setting
Caché 2007.1
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
org.hibernate.dialect.H2Dialect
HSQLDB
org.hibernate.dialect.HSQLDialect
Informix
org.hibernate.dialect.InformixDialect
Ingres
org.hibernate.dialect.IngresDialect
Interbase
org.hibernate.dialect.InterbaseDialect
JDataStore
org.hibernate.dialect.JDataStore
Mckoi SQL
org.hibernate.dialect.MckoiDialect
Mimer SQL
org.hibernate.dialect.MimerSQLDialect
Microsoft SQL Server
org.hibernate.dialect.SQLServerDialect
MySQL (versions prior to 5.x)
org.hibernate.dialect.MySQLDialect
MySQL (version 5.x and later)
org.hibernate.dialect.MySQL5Dialect
MySQL (prior to 5.x, using InnoDB
tables)

org.hibernate.dialect.MySQLInnoDBDialect
MySQL (prior to 5.x, using MyISAM
tables)

org.hibernate.dialect.MySQLMyISAMDialect
MySQL (version 5.x, using InnoDB
tables)

org.hibernate.dialect.MySQL5InnoDBDialect
Oracle (any version)
org.hibernate.dialect.OracleDialect
Oracle 8i
org.hibernate.dialect.Oracle8iDialect
Oracle 9i or 10g
org.hibernate.dialect.Oracle9Dialect
Oracle 10g only (use of ANSI join
syntax)

org.hibernate.dialect.Oracle10gDialect
Pointbase
org.hibernate.dialect.PointbaseDialect
PostgreSQL
org.hibernate.dialect.PostgreSQLDialect
Progress
org.hibernate.dialect.ProgressDialect
SAP DB
org.hibernate.dialect.SAPDBDialect
Sybase (or MS SQL Server)
org.hibernate.dialect.SybaseDialect
Sybase 11.9.2
org.hibernate.dialect.Sybase11Dialect
Sybase Anywhere
org.hibernate.dialect.SybaseAnywhereDialect
Teradata
org.hibernate.dialect.TeradataDialect
TimesTen 5.1
org.hibernate.dialect.TimesTenDialect
Unisys 2200 RDMS
org.hibernate.dialect.RDMSOS2200Dialect



If you don't see your target database here, check whether support
has been added to the latest Hibernate release. Most of the dialects are
listed in the SQL
Dialects
section of the Hibernate reference
documentation. If that doesn't pan out, see if you can find a third-party
effort to support the database, or consider starting your own!









No comments: