File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes what diaelect doing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "what diaelect doing?" Watch "what diaelect doing?" New topic

what diaelect doing?

vianyrajnish rajnish
Ranch Hand

Joined: Apr 22, 2007
Posts: 70

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

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


vinay rajnish
Stevi Deter
Ranch Hand

Joined: Mar 22, 2008
Posts: 265

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.

There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

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
I agree. Here's the link:
subject: what diaelect doing?
It's not a secret anymore!