Hibernate with MySQL Database by R4R Team

MySQL is one of the most popular open-source database systems available today.  createhibernate.cfg.xml configuration file and place it in the root of your application's classpath and we need to create the testdb table in the database.

XML Configuration with DTD:

http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd.

"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
org.hibernate.dialect.MySQLDialect
com.mysql.jdbc.Driver
jdbc:mysql://localhost/test
root
root123

The above configuration file includes tags which are related to hibernate-mapping file and we will see in next chapter what exactly is a hibernate mapping file and how and why do we use it. Following is the list of various important databases dialect property type:

Database

Dialect Property

 

DB2

org.hibernate.dialect.DB2Dialect

HSQLDB

org.hibernate.dialect.HSQLDialect

HypersonicSQL

org.hibernate.dialect.HSQLDialect

Informix

org.hibernate.dialect.InformixDialect

Ingres

org.hibernate.dialect.IngresDialect

Interbase

org.hibernate.dialect.InterbaseDialect

Microsoft SQL Server 2000

org.hibernate.dialect.SQLServerDialect

Microsoft SQL Server 2005

org.hibernate.dialect.SQLServer2005Dialect

Microsoft SQL Server 2008

org.hibernate.dialect.SQLServer2008Dialect

MySQL

org.hibernate.dialect.MySQLDialect

Oracle (any version)

org.hibernate.dialect.OracleDialect

Oracle 11g

org.hibernate.dialect.Oracle10gDialect

Oracle 10g

org.hibernate.dialect.Oracle10gDialect

Oracle 9i

org.hibernate.dialect.Oracle9iDialect

PostgreSQL

org.hibernate.dialect.PostgreSQLDialect

Progress

org.hibernate.dialect.ProgressDialect

SAP DB

org.hibernate.dialect.SAPDBDialect

Sybase

org.hibernate.dialect.SybaseDialect

Sybase Anywhere

org.hibernate.dialect.SybaseAnywhereDialect


Class name

Functionality

Assert

A set of assert methods

TestCase

test case defines the fixture to run multiple tests

TestResult

TestResult collects the results of executing a test case.

TestSuite

TestSuite is a Composite of Tests

Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!