File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Misleading Inheritance Model names - Java Beat questions

 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It asks

8) Which of the following are valid Inheritance hierarchy models specified in the
Java Persistence Specification?

a. Table per concrete class hierarchy
b. Table per subclass hierarchy
c. Single table per class hierarchy
d. All the above


a is correct. b is incorrect. But the answers say C is also correct. C would have been correct if it was 'single table hierarchy'. The 'per class' term is misleading! Even MZ guide uses this term!

 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even MZ guide uses this term!

This guide is made from the specification : 2.1.10.1 Single Table per Class Hierarchy Strategy
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Single Table Per Class means 1 class table! But the model actually uses 'single table for all entity classes in an heirarchy'

found the 'per class' term a bit
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
found the 'per class' term a bit

It's 'per class hierarchy', not 'per class'
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was interpreting it as (single table per class) heirarchy, taking heirarchy to be synonymous to 'model'

...it's actually single table per (class heirarchy) !!

Thanks!!
 
Sameer Ali
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a and c are valid
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic