4 ms·
> Polymorphic data. Instead of countless nullable fields that represent the union of all fields of all subtypes, I just include a single (or in some cases, a co
by kumarvvr 7y ago
> Polymorphic data. Instead of countless nullable fields that represent the union of all fields of all subtypes, I just include a single (or in some cases, a couple) JSONB columns whose schema varies by type. The schema is enforced by types at the application layer.
I am surprised there aren't many database interface libraries that build upon this. This is a very powerful aspect of JSONB in PGSQL.