← Graph

Single Table Inheritance

concept 1 connections

Rails pattern (STI) where several model subclasses share one table and are distinguished by a `type` column. Chikahiro Tokoro uses STI as the cautionary example in his DRY-vs-knowledge demonstration: introducing a `Document` STI parent for Customer/Invoice/Receipt dries up code duplication but collapses distinct domain concepts into a God object as new invoice-only, receipt-only, and company-only rules accrete.

category
pattern
about
Single Table Inheritance concept
STI is the example of how applying DRY to coincidental duplication creates a God object.

Provenance

Read by
1 extraction