Wolfgang wrote in post #1000187:
STI is a good approach, but my “subtables” have additional attributes
and afaik this isn’t supportet by STI, is it?
user << Base
employee << user
In the past I used a framework that supported other techniques besides
Single-Table Inheritance. There were actually two other options that
were called Horizontal and Vertical Inheritance. Of those options
Vertical Inheritance was the closest to what we think of as object
inheritance (as you described above), but was also the least efficient.
The issue is that both Horizontal and Vertical inheritance require
multiple queries to get to all the data you need, which causes
performance problems. Even with a framework that supported the other
techniques, using STI was strongly recommended. The performance costs of
either Horizontal or Vertical was simply too high. Inheritance doesn’t
map well to RDBMS. The cost of the null fields in a single table that
contains all attributes for the entire inheritance hierarchy is
negligible compared to the other techniques.