Single Table Inheritance

Let’s learn about Single Table Inheritance.

Single-level class hierarchy

Consider the single-level class hierarchy shown in the figure below as the design for the model classes of an MVC app. This hierarchy is an incomplete disjoint segmentation of the class Book.

In this kind of a case, whenever we have a model class hierarchy with only one or a few levels of subtyping and each subtype has only a few additional properties, then it’s preferable to use Single Table Inheritance. We model a single table that contains ...