Hibernate ships with detailed support for many 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 net.sf.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.
Database system | Appropriate hibernate.dialect setting |
---|---|
DB2 | net.sf.hibernate.dialect.DB2Dialect |
FrontBase | net.sf.hibernate.dialect.FrontbaseDialect |
HSQLDB | net.sf.hibernate.dialect.HSQLDialect |
Informix | net.sf.hibernate.dialect.InformixDialect |
Ingres | net.sf.hibernate.dialect.IngresDialect |
Interbase | net.sf.hibernate.dialect.InterbaseDialect |
Mckoi SQL | net.sf.hibernate.dialect.MckoiDialect |
Microsoft SQL Server | net.sf.hibernate.dialect.SQLServerDialect |
MySQL | net.sf.hibernate.dialect.MySQLDialect |
Oracle (any version) | net.sf.hibernate.dialect.OracleDialect |
Oracle 9 (specifically) | net.sf.hibernate.dialect.Oracle9Dialect |
Pointbase | net.sf.hibernate.dialect.PointbaseDialect |
PostgreSQL | net.sf.hibernate.dialect.PostgreSQLDialect |
Progress | net.sf.hibernate.dialect.ProgressDialect |
SAP DB | net.sf.hibernate.dialect.SAPDBDialect |
Sybase | net.sf.hibernate.dialect.SybaseDialect |
Sybase Anywhere | net.sf.hibernate.dialect.SybaseAnywhereDialect |
If you don't see your target database here, check whether support has been added to the latest Hibernate release. 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!