• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Best inheritance mapping strategy..

 
Ranch Hand
Posts: 109
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,

We know that there is there are 3 inheritance mapping strategies in java persistence.

* SINGLE TABLE PER CLASS HIERARCHY
* JOIN SUB CLASS HIERARCHY
* TABLE PER CONCRETE ENTITY CLASS

And I know that SINGLE TABLE PER CLASS HIERARCHY and JOIN SUB CLASS HIERARCHY are better than TABLE PER CONCRETE ENTITY CLASS because support for polymorphic relationships are very poor with TABLE PER CONCRETE ENTITY CLASS strategy.

So my question is what is the best strategy from both SINGLE TABLE PER CLASS HIERARCHY and JOIN SUB CLASS HIERARCHY with minimum draw backs.
 
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In general I would recommend SINGLE_TABLE, as it is normally to simplest and most efficient.

But it depends on your data, if the hierarchy has little data in common, the using JOINED or even TABLE_PER_CLASS may be desirable.

 
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic