该方言指定Hibernate中使用的数据库类型, 以便Hibernate生成适当类型的SQL语句。为了将任何Hibernate应用程序与数据库连接, 需要提供SQL方言的配置。
SQL方言的语法
<
property name="dialect">
org.hibernate.dialect.Oracle9Dialect<
/property>
SQL方言列表
【Hibernate中的SQL方言】在org.hibernate.dialect包中为RDBMS定义了许多Dialects类。它们如下:
关系数据库管理系统 | 方言 |
---|---|
Oracle (any version) | org.hibernate.dialect.OracleDialect |
Oracle9i | org.hibernate.dialect.Oracle9iDialect |
Oracle10g | org.hibernate.dialect.Oracle10gDialect |
MySQL | org.hibernate.dialect.MySQLDialect |
带有InnoDB的MySQL | org.hibernate.dialect.MySQLInnoDBDialect |
MySQL与MyISAM | org.hibernate.dialect.MySQLMyISAMDialect |
DB2 | org.hibernate.dialect.DB2Dialect |
DB2 AS/400 | org.hibernate.dialect.DB2400Dialect |
DB2 OS390 | org.hibernate.dialect.DB2390Dialect |
Microsoft SQL服务器 | org.hibernate.dialect.SQLServerDialect |
Sybase | org.hibernate.dialect.SybaseDialect |
Sybase Anywhere | org.hibernate.dialect.SybaseAnywhereDialect |
PostgreSQL | org.hibernate.dialect.PostgreSQLDialect |
SAP数据库 | org.hibernate.dialect.SAPDBDialect |
Informix | org.hibernate.dialect.InformixDialect |
HypersonicSQL | org.hibernate.dialect.HSQLDialect |
Ingres | org.hibernate.dialect.IngresDialect |
Progress | org.hibernate.dialect.ProgressDialect |
Mckoi SQL | org.hibernate.dialect.MckoiDialect |
Interbase | org.hibernate.dialect.InterbaseDialect |
Pointbase | org.hibernate.dialect.PointbaseDialect |
FrontBase | org.hibernate.dialect.FrontbaseDialect |
Firebird | org.hibernate.dialect.FirebirdDialect |