Single Table Inheritance
Single table inheritance is a way to emulate object-oriented inheritance in a relational database.[src] When mapping from a database table to an object in an object-oriented language, a field in the database identifies what class in the hierarchy the object belongs to.[src] All fields of all the classes are stored in the same table, hence the name "Single Table Inheritance".[src] In Ruby on Rails the field in the table called 'type' identifies the name of the class.[src] In Hibernate (Java) and Entity Framework this pattern is called Table-Per-Class-Hierarchy and Table-Per-Hierarchy (TPH) respectively., and the column containing the class name is called the Discriminator column.[src]
Single table inheritance is a way to emulate object-oriented inheritance in a relational database.[src] When mapping from a database table to an object in an object-oriented language, a field in the database identifies what class in the hierarchy the object belongs to.[src] All fields of all the classes are stored in the same table, hence the name "Single Table Inheritance".[src] In Ruby on Rails the field in the table called 'type' identifies the name of the class.[src] In Hibernate (Java) and Entity Framework this pattern is called Table-Per-Class-Hierarchy and Table-Per-Hierarchy (TPH) respectively., and the column containing the class name is called the Discriminator column.[src] ==See also== Object–relational mapping ActiveRecord (Rails) ==References== ==External links== Single Table Inheritance Single Table Inheritance in Yii Single Table Inheritance in Django[src]
11 sentences · 11 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Single Table Inheritance." encyclopegia.org, 2025, https://encyclopegia.org/wiki/single-table-inheritance. Accessed 30 November 2026.
Chicago
"Single Table Inheritance." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/single-table-inheritance.
APA
encyclopegia.org. (2025). Single Table Inheritance. Retrieved November 30, 2026, from https://encyclopegia.org/wiki/single-table-inheritance
Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON