I have data that fits an entity-attribute-value structure but with very few entries (same attributes but different values) per entity.
The main characterizations of my data are as follows:
- ~700 different entity types, but only 3-4 entries for each type.
- ~1400 attributes, but only 2 including the id are used for every type.
- ~75% of the attributes are unique to a type, but a substantial number are used for many types.
- The data will be very static, very rarely requiring changes.
- Queries will primarily consist of filtering on attributes.
Based on my use-case and the fact that there will only be a few thousand entries total, my initial thought is to use a single table inheritance model. That said, the sparsity of the table leaves me wondering if jsonb or hstore or something else I haven't thought of might be a better solution.
I'm using Postgres 9.5