-->
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: can I use Hibernate to translate from oracle to mysql
PostPosted: Tue Jan 13, 2004 2:15 am 
Newbie

Joined: Tue Jan 13, 2004 2:05 am
Posts: 2
Dear friends,

I am a newbie, I just know about Hibernate. so would anyone tell me if I can use Hibernate to translate database from oracle to mysql.

I have a little homework, translating database from oracle to mysql. there is no big object (BLOB,CLOB) in the oracle database. so in my opinion, first, I should get the oracle DDL, and then translate this oracle DDL to mysql DDL, and then creating mysql database according to this DDL. the last step is to translate data from oracle database table to mysql database table.

I am afraid it will cost me a long time to learn how to use Hibernate, but at last I found I can't finish this conversion using Hibernate, so would anyone tell me if Hibernate can do this job or part of this job? for example, if Hibernate can translate oracle DDL to mysql DDL? if you can give me some little detail information, I will great appreciate!

any hint will be great appreciated!

Sammy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2004 4:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Please stop crossposting the forums


Top
 Profile  
 
 Post subject: Suggestion
PostPosted: Tue Jan 20, 2004 10:02 am 
Regular
Regular

Joined: Fri Sep 05, 2003 12:01 am
Posts: 80
Location: Bogot
Hi!

Well: I think you can do that.


You will need to create Java objects to map to each one of your Oracle tables and with their relationships. Hibernate has an ant task (cant rememeber the exact name) and theres also this class you might be interested in: http://www.hibernate.org/hib_docs/api/net/sf/hibernate/tool/hbm2ddl/SchemaExport.html.

the key step to go from DB to DB is to change the DB dialect in you hibernate configuration file.

After changing it to MYSQL you should be able to have you DB shema in the appropiate DB dialect.

Hope it helps.

_________________
Mauricio Hern


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.