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: Migration to Hibernate - Database changes required
PostPosted: Mon Jun 18, 2007 10:54 pm 
Newbie

Joined: Mon Jun 18, 2007 10:34 pm
Posts: 1
Hi All ,

I have three questions for now.
Any response is appreciated.


(i)

Is it possible to hook up the existsing database with Hibernate without modifying the database.

Like if the tables have only business primary key (ex: UserName)and doesnt have any sequence or any other numbers generated as primary key column .

(ii)

Does using Hibernate for a existsing project always results in a better performace , assuming the hibernate coding and configuration is done perfectly ?

(iii)

Any ideas on how to decide regarding migrating to Hibernate

thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 19, 2007 2:02 am 
Regular
Regular

Joined: Wed May 05, 2004 8:01 am
Posts: 53
I)
As long as you haven't done any fatal mistakes designing your database you will have no problem to migrate to hibernate.

Having a "business" primary key is not a problem. Hibernate does not have to use sequences or auto increment columns to generate ID values if you do not want. In this case it's your responsibility to assure ID uniqueness.

II)
No. It depends on your database purpose. Hibernate does not work well with massive deletes (as you _usually_ need to query the list of objects). It is also not well suited for applications with lots of reporting - HQL does not have all SQL features (although I have used HB in such and I'm happy with it).

For most applications where you deal with single entities hibernate is probably way better than any home made persistence solution.

Please have in mind that you always can use hibernate in 99% of your application and fix the performance of this 1% by using direct JDBC access. This is the common technique.

III)
This subject is very broad. You should start with creating an object model of your database and then tweak mappings so it reflects physical structure (table names, column names, constraints).

Please rate if that helped.


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.