HIBERNATE JBoss.org
 |  Register  | 
     
News 
About 
   Feature List 
   Road Map 
Documentation 
   Related Projects 
   External Documentation 
Download 
Forum & Mailinglists 
Support & Training 
JIRA Issue Tracking
Wiki Community Area


Hibernate Public Training Courses


Get Hibernate in Action eBook!


JavaWorld 2003 Finalist


Jolt Award 2004 Winner
      
Documentation > Community Area > Compatibility Guide & Supported Databases

Compatibility Guide & Supported Databases

Please 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

License:
URL: http://www.daffodildb.com/daffodildb.php
Issues: Daffodil DBv3.1 is a J2EE certified, SQL-99 and JDBC 3.0 standards compliant, platform independent and easily embeddedable 100% Java RDBMS. It helps you build comprehensive, efficient and powerful relational database applications in Java™ to handle complex needs. Download URL: http://daffodildb.com:8080/eval/filldetails.jsp

PostgreSQL

License: Open Source
URL: http://www.postgresql.org
Issues: Support for user-defined data types (UDT), see here.

Sybase

License: Open Source
URL: http://www.sybase.com/
Issues: jTDS: also used with Microsoft SQL Server.

SAP DB

License: Open Source
URL: http://www.sapdb.org
Issues: n/a

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

License: n/a
URL: http://www.progress.com
Issues: na/

Mckoi SQL

License: Open Source
URL: http://mckoi.com/database/
Issues: n/a

Data Replication Tool

License:
URL: http://www.daffodildb.com/dbreplicator.php
Issues: n/a

Pointbase

License: n/a
URL: http://www.pointbase.com/home.shtml
Issues: n/a

Interbase

License: n/a
URL: http://www.borland.com/interbase/
Issues: n/a

FrontBase

License: n/a
URL: http://www.frontbase.com/cgi-bin/WebObjects/FrontBase
Issues: n/a

Ingres

License: n/a
URL: http://www3.ca.com/Solutions/Product.asp?ID=1013
Issues: n/a
      

coWiki