This well-trodden pattern is called EAV (entity, attribute, value). It's attractive up to the point where you want to do interesting things with multiple attributes, which is when you start doing multiple nested self joins on the EAV table and performance gets hairy.
For smaller scale auxiliary data it's fine, but so is JSONB.
Comments
This well-trodden pattern is called EAV (entity, attribute, value). It's attractive up to the point where you want to do interesting things with multiple attributes, which is when you start doing multiple nested self joins on the EAV table and performance gets hairy.
For smaller scale auxiliary data it's fine, but so is JSONB.
Where can I read more about this?
Wikipedia has an exhaustive article[1].
https://en.wikipedia.org/wiki/Entity–attribute–value_model#E...