Replacing EAV with JSONB in PostgreSQL
TL;DR: JSONB has potential for greatly simplifying schema design without sacrificing query performance.
Introduction It must be one of the oldest use cases in the world of relational databases: you have an entity, and you need to store certain properties of this entity. But, not all entities have the same set of properties, and properties will be added in the future.
The most naive way to solve this problem would be to create a column in your table for each property, and just fill in the ones that are relevant.
coussej.github.io