-->
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.  [ 4 posts ] 
Author Message
 Post subject: Entity Beans vs Hibernate and Distributed query/updates
PostPosted: Wed Apr 14, 2004 10:17 am 
Newbie

Joined: Mon Apr 12, 2004 3:27 pm
Posts: 3
Location: USA
Hi,

I am working on a large (enterprise scale) project. I recently downloaded Hibernate 2.1 and read its documentation and examples. I still have couple of questions unanswered:

1> Entity Beans vs Hibernate:
- What does Hibernate have that Entity Beans can NOT offer?
- What do Entity Beans have that Hibernate can NOT offer?

I am particularly interested in ability to query or update tables from multiple databases (databases hosted on different database servers in different countries) in one EJB transaction.
(* An interesting thing is, some databases still don't support 2-phase commit.)

2> HQL / Database capabilities:
- Can you maintain foreign keys across databases using Hibernate classes?
- Does HQL support joining tables from different databases?

For example, assuming table1 in database1 and table2 in database2; will following query work?
SELECT table1.col1, table2.col2
FROM table1, table2
WHERE table1.col3 = table2.col3

Some databases like Oracle, MS SQL Server (and more) support cross database joins. But does Hibernate support it in HQL?

Thanks for your time,
- Hrishi


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 7:03 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Hibernate uses JDBC, so you have all (well, mostly) of the JDBC features and SQL features. Just join your databases at the database level.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 11:25 am 
Newbie

Joined: Mon Apr 12, 2004 3:27 pm
Posts: 3
Location: USA
Thanks for the reply, Christian.

>Hibernate uses JDBC, so you have all (well, mostly) of the JDBC features and SQL features.

Well, that explains it.

>Just join your databases at the database level.

Could you please ellaborate a little more on "join your databases at the database level"? How to do that / where can I find such example or documentation?

(If this is going out of scope of Hibernate, may be point me in the correct direction).

Thanks again,
- Hrishi


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 11:30 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
The manual of your database and "views".

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.