Compatibility Guide & Supported DatabasesPlease click "Edit this page" and share your experiences! Hibernate requires JDK 1.2 or later (some people have run successfully under 1.1.8) and has been tested with the following SQL databases:
- DB2 7.1, 7.2, 8.1
- MySQL 3.23, 4.0
- PostgreSQL 7.1.2, 7.2, 7.3, 7.4
- Oracle 8i, 9i
- Sybase 12.5 (JConnect 5.5)
- Daffodil DBv3.1
- Interbase 6.0.1 (Open Source) with Firebird InterClient 2.01
- HypersonicSQL 1.61, 1.7.0
- Microsoft SQL Server 2000
- Mckoi SQL 0.93
- Data Replication Tool
- Progress 9
- Pointbase Embedded 4.3
- SAP DB 7.3
Hibernate is also thought to be compatible with the latest versions of:
- Informix
- Ingres
- FrontBase
- Firebird (1.5 with JayBird 1.01)
It is highly likely that most features of Hibernate (i.e. everything except DDL schema generation) will work perfectly with many other relational databases. You may easily add a new SQL dialect by extending the existing dialects. Keep in mind that some features of the query language are not supported for databases which do not have subqueries.
Oracle
License: | Commercial | URL: | http://technet.oracle.com/ | Issues: | Do not use JDBC drivers before version 9.2.0.3 for Oracle 9. These drivers have a round-off bug which strips of any number with decimals (e.g. from 666.67 to 666.0). Oracle JDBC drivers have extremely bad support for large text or binary columns. At least some versions of the Oracle 9i driver handle JDBC timestamps extremely badly - do not use timestamps for optimistic locking, use version numbers. |
DB2
License: | Commercial | URL: | http://www.ibm.com/db2 | Issues: | On iSeries use V5R1 or later, which allows key mappings containing file.name. Remove schema reference from mappings for *LIBL on iSeries. |
Firebird
License: | Open Source based on the commercial Interbase | URL: | http://firebirdSql.org/ | Issues: | Offers many ANSI SQL-92 features, runs on Linux, Windows, and a variety of Unix platforms. Excellent concurrency, high performance, and powerful language support for stored procedures and triggers. It has been used in production systems, under a variety of names since 1981. JDBC type 4 driver with excellent support. DDL statements cannot be executed when there is more than one open JDBC connection. PreparedStatement caching is impossible! Firebird InterClient 2.01 is strongly recommended in preference to other versions of Interbase Interclient. Its also worth trying the latest pure Java "JayBird" driver (http://www.ibphoenix.com). |
MySQL
License: | Open Source | URL: | http://www.mysql.com/ | Issues: | No subselects in "current" versions (subselect support is currently in beta). No transactions with MyISAM tables, only with InnoDB tables (consider changing the default for your databases). The Caucho JDBC driver does not work. |
Daffodil DB
PostgreSQL
Sybase
SAP DB
HypersonicSQL
License: | Open Source | URL: | http://hsqldb.sourceforge.net/ | Issues: | Pure Java, no subselects, has issues with case-sensitivity and missing quotes in generated SQL. Only integers can be used for the "native" generator in current versions (this is fixed in HSQL CVS). |
Microsoft SQL Server
License: | Commercial | URL: | http://www.microsoft.com/sql/default.asp | Issues: | Version supported: 2000, but creating a dialect for version 7 should be easy. jTDS: also used with Sybase. Use some driver other than Microsoft's own! If you use the MS JDBC driver, these are the issues you will face: Blobs and Clobs are not supported. Problems with Dates: MSSQL when you search for dates wants to search by seconds and milliseconds. When you convert a SQL date to a Java Timestamp object, and then back again, you seem to lose the milliseconds. The seconds match, but not the milliseconds. So don't use date's as part of a composite key/primary key. Reportedly, the Microsoft JDBC driver is quite slow, you have to add sendStringParametersAsUnicode=false to JDBC URL to increase performance. You must always use selectMethod=cursor. You may get a "Reread" error when reading tables with NVARCHAR or Images. You can solve that issue by proxying the MS JDBC Driver: MSJdbcProxy. Microsoft SQL Server does actually not ship with a JDBC driver. Various third party drivers are available, some (but not all) of which do work. If you are using triggers, Hibernate will get confused when the first result returned by a statement is "0" (in jTDS, use the parameter lastUpdateCount=true in the driver). The following drivers are known to work: JSQL http://www.j-netdirect.com, JTurbo http://www.newatlanta.com/products/jturbo, Weblogic jDriver http://www.bea.com/products/weblogic/drivers.shtml - it is quite likely that you will be able to use either of the following two drivers (which actually appear to be the same driver) successfully: Microsoft SQL Server 2000 Driver for JDBC SP1 and DataDirect Connect for JDBC (http://ddtek.com). There are some weird date-handling issues with these drivers, so they are not officially supported. Don't bother with the DataDirect SequeLink driver; it has very serious problems. We have had great luck (not a single issue) with the inet drivers (http://www.inetsoftware.de/) but they are relatively expensive. |
Progress
Mckoi SQL
Data Replication Tool
Pointbase
Interbase
FrontBase
Ingres
|