Class table inheritance represents an inheritance hierarchy of classes with one table per class.

Relational databases don’t support inheritance.

The class table inheritance, however, should allow the concrete tables to reflect the class hierarchy.

The fields in the domain class should map directly to the fields in the database tables.

Class table inheritance users inheritance mappers

Note: joins for more than three or four tables tend to be slower.

Advantages

  1. All columns are relevant for every row so tables are easier to understand, validate, and they don’t waste space.
  2. Relationship between the domain model and the database tables are easy to understand.

Issues

  1. You need to touch multiple tables to load an object.
  2. Any refactoring of fields up or down the hierarchy requires database changes.
  3. Superclass may become a bottlenect because they are accessed