Looking for a right EAV structure based on jsonb
问题 I wondering what will be the right approach to build EAV on jsonb. I have Attribute -> Values tables as like in standard EAV. CREATE TABLE attribute_values ( id INTEGER, attribute_id INTEGER, value VARCHAR(255) ); CREATE TABLE attributes ( id INTEGER, name VARCHAR(255) ); Values will saved in attributes filed of Entity CREATE TABLE entity ( id INTEGER, title TEXT, attributes JSONB ); Tables Attribute created to control duplicate attributes their types and better determine what it's a