Subject RE: [firebird-support] Many to many (tables) relationship
Author Leyne, Sean
> I have to represent a relationship between a result set which is stored as a
> row in a table, and a row of static parameters that were used in the algorithm
> that produced the result.
> The problem is that the single row of values is chosen from among many
> tables. So I can't just use a foreign key pointing from the result to the
> parameters. I can't use a junction table either, as this is to many _tables_ not
> many rows.
>
> Am I stuck adding a column for every table I may want to point to? If so, then
> I can't set the field as NOT NULL to make sure a relationship always exists.

Your last statement is a little confusing.

Unless the result rows "must be related to" one entry from each of the possible tables, there is no need for the "relationship always exists".

BTW, how many tables are you referring to?


Sean