• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inheritence in JPA

 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q1) I am confused with names? By how many names each one reffered?




1) Table per class hierarchy or Single table or Single Table Inheritance // Are these names are correct?Do they mean the same thing?
Data is store in one table.
lot of null able columns

2) Table per Subclass or Joined Inheritance
parent child relationship is established
No null able column

3) Table per class or table per concrete class

Each class has its own table
Parent fields get duplicated in table
Data gets repeated again and again






 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds about right.

For #3, no data is duplicated, only columns. Each instance is only stored in one of the tables.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic