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