create table a_to_b_map ( a_id integer references a_table(a_id) unique, b_id integer references b_table(b_id) unique(a_id, b_id) );
This table lets you map one a object to many b objects.