2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

Why we configure data source in SQL dialect hibernate

We keep our database configuration properties in a hibernate dialect and now my question is what is the meaning of dialect? I configure this property according to the documentation of Hibernate but I don"t know what"s the meaning of it.
userimage

Hibernate, as we know, is database agnostic. It can work with different databases. However, databases have proprietary extensions/native SQL variations, and set/sub-set of SQL standard implementations. Therefore at some point hibernate has to use database specific SQL.

  • Hibernate uses "dialect" configuration to know which database you are using so that it can switch to the database specific SQL generator code wherever/whenever necessary.
  • hibernate.dialect property makes Hibernate to generate the appropriate SQL statements for the chosen database.
Answer is