jargon

Design patterns·Objects and the database between them

one table holds three kinds of thing, a type column says which, and most columns are null for most rows.

Single table inheritance

Also calledSTI, one table per hierarchy, discriminator column

Mapping a whole inheritance hierarchy to one table with a discriminator column and the union of all subclass fields. It is the simplest of the three inheritance mapping strategies and the fastest to query, at the cost of nullable columns that the database cannot constrain. The alternatives — a table per class, or a table per concrete class — move the cost to joins or to duplicated columns instead; none of the three is free, which is the impedance mismatch in miniature.

Commonly confused with