-->
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: Inheritance strategy and performance issue
PostPosted: Thu Mar 04, 2004 6:03 am 
Regular
Regular

Joined: Thu Feb 05, 2004 6:51 am
Posts: 50
Hi all,

I'm like to be sure of something about the different inheritance strategy. If the subclasses are very sollicitated, wouldn't it be better to adopt a table per class hierarchy strategy rather than table per subclass because of the joint query between the root table and the "sub tables" ?

What could be the advantage of the second strategy?

Vladislav


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 04, 2004 6:15 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
With the second strategy you can put constraints on your columns (not null constraints for example). With the first strategy, if you have one attribute that is mandatory in one subclass but not present in another one, you cannot put the not-null constraint on the database column.
Another problem is if you have a lot of subclasses with a lot of differents attributes. This will lead in a very huge table, not maintanable.

Seb


Top
 Profile  
 
 Post subject: Inheritance strategy and performance issue
PostPosted: Thu Mar 04, 2004 7:14 am 
Beginner
Beginner

Joined: Wed Mar 03, 2004 9:44 am
Posts: 23
Location: Brasil
Please, see the post "Hibernate and Inheritance"[1] and think.

[1] http://forum.hibernate.org/viewtopic.php?t=928586

[]s

Ary Junior


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.