Single table inheritance is an inheritance hierarchy of classes as a single table that has columns for all the fields.

RelationshipRelational databases don’t support inheritance.

STI tables require a class_name field and a class_id field.

Advantages

  1. Single table simplicity.
  2. No joins.
  3. Any refactoring that pushes fields up or down the hierarchy doesn’t change the database.

Issues:

  1. Contains irrelevant fields for specific classes.
  2. Creates wasted space.
  3. STI table may become too large with multiple index and frequently locking; which impacts performance.
  4. You have a single namespace for fields so the same name coant can’t be used for difference datatype in ifferent classes.