create table items ( id integer, subid integer, data text, primary key (id, subid), foreign key (id) references baseitems (id) );