Single Table Inheritance

Image of Author
August 1, 2025 (last updated August 1, 2025)

https://en.wikipedia.org/wiki/Single_Table_Inheritance

https://martinfowler.com/eaaCatalog/singleTableInheritance.html

From the wikipedia page:

Single table inheritance is a way to emulate object-oriented inheritance in a relational database.

All fields of all the classes are stored in the same table, hence the name "Single Table Inheritance"

This will result in potentially a lot of Null cells if there is not a lot of inherited (shared) properties of your objects.

This is used in object-oriented programming and is seen in frameworks like Ruby on Rails, in Ruby, and in Java in various ORM solutions.