Hibernate Inheritance Mapping

Inheritance is one of the most important object oriented properties with which one class\Entity inherites the property of another class\Entity.

Several strategy to map the same with hibernate:

-->Single table per class hierarchy strategy:

In this type of strategy one single table is used to map the hierarchy and an extra column is used to which act as a discrminator to identify the class.

-->Joined subclass strategy or table per concrete class

In this type of strategy tables are created per class and related by primary and foreign key. But duplicate column is added in subclass tables.

-->Table per subclass strategy

In this type of strategy tables are created per class and related by primary and foreign key. No duplicate columns.