Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what diaelect doing?

 
vianyrajnish rajnish
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,


what exactly dialect doing in the hibernate .....

why can't we use Drivers itself ......?







thanks

vinay rajnish
 
Stevi Deter
Ranch Hand
Posts: 265
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate separates the connection information (driver, url, username and password) and the dialect information.

The dialect tells Hibernate which flavor of SQL it must generate to talk to the database.

There are fewer dialects than drivers, so I'd argue it makes perfect sense to use the dialect to drive the SQL generation.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Each database is different, and despite all attempts to standardize database access, there are always differences, be it because certain vendors have deviated from agreed upon specs, or because some vendors just implemented something wrong. The dialect compensates for this, and helps make Hibernate as database agnostic as possible.

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic