-->
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: A beginners question: HQL vs SQL (and use of VB?)
PostPosted: Tue Nov 07, 2006 4:45 am 
Newbie

Joined: Tue Nov 07, 2006 4:26 am
Posts: 2
Hi people,

I have just started with Hibernate and read some of the tutorials of Gary Mak which I found here (big up for Gary, your tuts rule!) But I am still oriëntating om what method I should use.

To make a long story short: I need to temporarily built a tool that can harvast data from a database. The database is filled with data using Hibernate. Only question is: do I need to do this too?

As I have understood from the tutorials, Hibernate is not a database, but an object that stands between the user and the database, optimising the use of any DB type you use (could I even go so far of saying it supports a wide variety of DB's like MySQL, Access and the likes?)

As far as I have read, Hibernate can only be used for Java, but my Java knowledge is 0.0 so that would mean a serious learning curve for me.

On the other hand, I can work with VB quite handy, am familiar with ADODB and standard SQL commands.

My question to you guys is:

1) Is HQL also available outside Java (e.g. in VB) and have I simply missed it?
2) What advantage do I have using HQL above SQL (I can imagine that the caching is somthing that boast performance, but since my tool is just temporarily, is it worth the learning curve?)

To give you all an idea: I use my tool to create graphs based on the data in the DB. I'd like to use views, joins, select from where, counts and the likes to create the data. the data then is treated outside the DB (excel) to form graphs.

Thanks for the help!

_________________
There are 10 kinds of people - Those who think binary, and those who don't


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 07, 2006 5:27 am 
Senior
Senior

Joined: Sat Nov 27, 2004 4:13 am
Posts: 137
first of all I should mention that using hibernate just for improving performance is a dummy idea!

because do the mapping, populating entities, and converting HQL to SQL is lots of work which hibernate must manage....

and, no HQL is just usable inside Hibernate and NHibernate which is a port of Hibernate to .NET

so if you know .NET well, and can use NHibernate then you can use it, but there must be a good reason for that, otherwise you must create so many classes (entities) ...

_________________
don't forget to credit!

Amir Pashazadeh
Payeshgaran MT
پايشگران مديريت طرح
http://www.payeshgaran.co
http://www.payeshgaran.org
http://www.payeshgaran.net


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 07, 2006 7:43 am 
Newbie

Joined: Tue Nov 07, 2006 4:26 am
Posts: 2
I'm not sure if I understand the relation between Hibernate and the database clearly... So Hibernate is more then only a component used to communicate with a DB (like the ADODB component is used in VB)? I understood that the relation between the database and Hibernate is like:

Java App ---> Hibernate ---> "Any" Database

If this is untrue, could you (or anyone else) clarify the relation for me?

As I understand out your response, the .Net component can be used in VB .Net (or any other .Net language) to use hibernate outside Java. (I am new to .Net but willing to learn it, so that is a good alternative if I want to use hibernate.)

So , adding up, as far as I have understood:

1. VB .Net is an option to use NHibernate with
2. This leaves me two approaches for my app:

a. Visual Basic.Net ---> NHibernate ---> "Any" Database
b. Visual Basic.Net / Visual Basic 6.0 ---> ADODB ---> "Any" Database

Reading your advice over using Hibernate or not, I have the feeling you are discouraging it, since it takes a lot of effort to set everything up and the tool is only ment to be used for a short period? Have I understood this correctly?

Thanks for your reply!

_________________
There are 10 kinds of people - Those who think binary, and those who don't


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.