Gerardo Tasistro wrote:A column is added that identifies the type and thus allows the foreign key to reference only one table and not many as is the case of one table per class.
Yes, that's the common way to employ polymorphic associations: add another column for the "type" of entity you're referencing. For example:
The problem is that you can't declare a foreign key constraint to enforce referential integrity for polymorphic associations. A foreign key must reference exactly one parent table. So the only way to use polymorphic associations is to forgo referential integrity.
When we try to use an RDBMS in a way that makes it impossible to use a fundamental feature like referential integrity, this is a strong antipattern smell.