-->
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.  [ 1 post ] 
Author Message
 Post subject: Multiple MySQL databases on the same server
PostPosted: Tue Jan 18, 2005 9:58 pm 
Newbie

Joined: Sun Jan 09, 2005 2:30 am
Posts: 7
I have multiple mysql databases running on the same MySQL server. So for example I have databases A, B, and C.

In MySQL you can specify a database name as part of a table (regardless of which MySQL database you're connected to) to do cross-database operations. So I could do the following:

mysql -uuser C <-- connects to database C
select * from A.table1 t1, B.table2 t2 where t1.id = t2.table1_id

which joins across databases A and B even though I'm connected to C.

Is it then OK to use one hibernate session factory to connect to say database C and then in the mapping file specify the table name as A.table1 and B.table2? Or are there some issues to be concerned with using this approach?

Thanks,
Todd


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

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.