Table Per Type (TPT) inheritance (also called Vertical inheritance in Telerik Data Access terminology) is represented in the database by separate tables for each class in the hierarchy. Every table contains additional details describing a new type based on another table that is the parent of that table.
In TPT inheritance, each class in the hierarchy is mapped to its own table. A foreign key in the derived table references the primary key of the base table.
In this example, we will use the Database-First approach. Suppose your database contains the following linked tables.


In Entity Framework and LINQ, you need to:
In NHibernate, TPT inheritances are created automatically unless the Detect Table Per Type Inheritances checkbox is cleared in the model settings.

When you create TPT inheritance, you may need to manually define the name of the foreign key column in the derived table if it differs from the primary key column name in the base table. To illustrate this, let us consider the inheritance of the TPTMammal class from the TPTAnimal class.
For example, the TPTMammal class inherits from the TPTAnimal class. The classes are represented by the TPT_Animal and TPT_Mammal tables. These tables are linked by a foreign key:
If the foreign key column in the derived table has a different name than the base table’s primary key, configure it manually:

For more information on column parameters, see Database column mapping.