-- Adjust for your RDBMS
CREATE TABLE product (
	id varchar(26) PRIMARY KEY,
	type varchar(26) NOT NULL,
	name varchar(256) NOT NULL,
	name_code varchar(256) NOT NULL,
	stub varchar(128) NOT NULL
);

CREATE TABLE product_package (
	id varchar(26) PRIMARY KEY,
	product_id varchar(26) NOT NULL,
	name varchar(256) NOT NULL,
	size numeric(16, 4) NOT NULL,
	unit varchar(8) NOT NULL
);

CREATE TABLE product_package_variety (
	id varchar(26) PRIMARY KEY,
	product_id varchar(26) NOT NULL,
	package_id varchar(26) NOT NULL,
	variety_id varchar(26) NOT NULL
);


