CREATE TABLE "Product" ( "id" int PRIMARY KEY, "name" varchar(255) ); CREATE TABLE "Decorator" ( "id" int, "product_id" int CONSTRAINT Product_id REFERENCES Product(id), "field_name" varchar(255), "field_value" varchar(255) CONSTRAINT field_value REFERENCES field(value) );