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

Joined: Tue Jan 13, 2004 1:37 am
Posts: 11
In my point of view, hibernate is not a tools for you to transafer Oracle to MySQL, because you have not use hibernate under Oracle right now.
Hibernate is a tool of OR mapping, it split database and Program apart, when you use hibernate, it is very easy to switch to any type of database,and at the same time program will change only a less.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2004 2:51 am 
Pro
Pro

Joined: Tue Aug 26, 2003 1:24 pm
Posts: 213
Location: Richardson, TX
What exactly do you mean by "translate"? Do you want to transfer all data from one DB to the other? And I take it you have an existing Oracle DB and want to create a new MySQL DB?

If so you could create a mapping between the Oracle schema and a set of persistent objects, then generate MySQL DDL from that mapping using the MySQL dialect. Open two simultaneous sessions (one mapped to the Oracle DB, one to the MySQL DB) and use session.replicate() to write to the MySQL backed session.

Hibernate isn't particularly efficient at mass inserts, so this may be slow, but it would work.


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

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Hibernate is not really made for such tasks, even though it will surely be able to do the job. However using something like http://octopus.enhydra.org/ you wil probably get faster results.


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.