-->
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.  [ 2 posts ] 
Author Message
 Post subject: switching between relational databases
PostPosted: Mon Aug 23, 2010 4:09 pm 
Beginner
Beginner

Joined: Thu Nov 12, 2009 1:57 am
Posts: 22
Hi,
I am trying to use hibernate3 framework. I want to make sure that i can migrate my application between different relational databases. What care should i take during design and coding phase so that the migration is smooth.


Top
 Profile  
 
 Post subject: Re: switching between relational databases
PostPosted: Mon Aug 23, 2010 5:31 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
that's not very hard.
just avoid writing native SQL queries, but always make use of Hibernate's HQL or criterias to make sure you can switch the dialect. Otherwise make sure your SQL is really standard and cross-database compatible.
Also avoid using special primary key identifiers which are supported only by some databases (e.g. if you select "sequence", the model will work only on databases supporting sequences, while if you leave it to "auto" Hibernate will use sequences where they are supported or switch to other means).

_________________
Sanne
http://in.relation.to/


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