Re:When to Avoid JSONB in a PostgreSQL Schema
by zrail on Friday September 02, 2016 @04:47AM
(#12411776)
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.
Re:When to Avoid JSONB in a PostgreSQL Schema
by palmdeezy on Friday September 02, 2016 @09:14AM
(#12412755)
Where can I read more about this?
Re:When to Avoid JSONB in a PostgreSQL Schema
by zrail on Friday September 02, 2016 @10:24PM
(#12417417)
Wikipedia has an exhaustive article[1].
https://en.wikipedia.org/wiki/Entity–attribute–value_model#E...
Im not saying that you should not use JSONB for that (I probably would too for that example), Im just saying there are more ways to design your data storages.