Hi,
Can a many-to-one/one-to-many relationship between two classes be implemented with a separate join table?
The join table would look like:
Code:
many_id int not null,
one_id int not null unique,
primary key (many_id, one_id)
This would be useful if for some reason you didn't want to change the many side table to include a FK to the one side (i.e. there are very many rows but very few relationships, so for space efficiency), you are migrating from a many-to-many relationship, or you plan to migrate eventually to a many-to-many relationship.
many-to-many is unsatisfactory for this situation because on the many side class I want only a simple pointer to the single related object; I don't want to deal with a collection.