Hibernate

adplus-dvertising
Table Per Class Hierarchy
Previous Home Next

In this approach objects of all the classes of a family are mapped to a single table in a database. This table contain field to represent combined data member of all the classes of the family plus an additional fields is used to describe record of the table ,that is, to identified which record of table represent object of which class of the family.

Advantages Of this approach

Major advantages of this approach is performance. Because hibernate need to manage all the classes of the family.

Disadvantages Of this approach are

  • Table is not normalized
  • Not Null constraint can not be applied non the field representing data member of subclass
Previous Home Next