桌子 :
CREATE TABLE product_option
(
id bigint NOT NULL,
option_type character varying(255) NOT NULL,
value character varying(255) NOT NULL,
product_id bigint,
CONSTRAINT product_option_pkey PRIMARY KEY (id ),
CONSTRAINT fk_product FOREIGN KEY (product_id)
REFERENCES product (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE CASCADE
)
用户可以搜索具有选项列表的产品。即查找具有这些选项的产品:
BINDING_SIDE : BOTTOM
BINDING_SIDE : TOP
BINDING_TYPE : COIL_BINDING
结果应该只返回至少具有这三个选项的产品。(他们可以有更多选择)