Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Hibernate 3.5.1 Dialect is best for accessing MySQL 5.1

Right now I am using InnoDB tables but what confuses me is what if I am using more than one engine in the DB?

Since I used 'best' in the title it warns that the question is subjective but considering the very finite numbers of Dialects in question and that I don't understand the discriminating factors between them (what best is) I need this explained in the answer.

For reference here are the Dialects in question found under org.hibernate.dialect:

  • MySQL5Dialect
  • MySQL5InnoDBDialect
  • MySQLDialect
  • MySQLInnoDBDialect
  • MySQLMyISAMDialect
like image 475
Quaternion Avatar asked Jan 27 '11 00:01

Quaternion


1 Answers

MySQL InnoDB enforces referential integrity; ISAM does not.

MySQL version 5 is distinct from earlier versions.

MySQLDialect is probably legacy from the first Hibernate implementation, when there was no such choice.

Choose the one that best matches your version of MySQL (version 5 from your question) and the implementation you've used to create to your MySQL database.

like image 136
duffymo Avatar answered Sep 30 '22 21:09

duffymo