These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Reason for using HQL in Hibernate
PostPosted: Sat May 16, 2009 11:07 am 
Beginner
Beginner

Joined: Wed May 06, 2009 12:23 pm
Posts: 23
Hi , Please tell me what is the reason for using HQL , when the same thing can be done with the help of normal SQL query.

Sessions createSQLQuery()

How does an HQL will improve the performance as it will be internally converted to an SQL Query Itself.

Thanks in advance .


Top
 Profile  
 
 Post subject: Re: Reason for using HQL in Hibernate
PostPosted: Mon May 18, 2009 12:01 am 
Newbie

Joined: Tue Apr 07, 2009 8:48 am
Posts: 14
Location: Kerala,India
We can use SQL queries too in Hibernate... Some of the advantages of using HQL are:

1. HQL choses the best SQL statement from a set of SQL statetments for performing a task.
2. Using HQL will help in portability. ie: you can export your entire DB(from oracle i think u are workin on oracleDB) to some other DB with no much changes. You need to change the dialect and driver name in the config file.


Rate if found helpful

_________________
Its fun to LEARN
guru_G


Top
 Profile  
 
 Post subject: Re: Reason for using HQL in Hibernate
PostPosted: Wed May 20, 2009 11:56 am 
Beginner
Beginner

Joined: Wed May 06, 2009 12:23 pm
Posts: 23
Thank you very much for your time .That was nice .


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.