Subject RE: [firebird-support] Many to many (tables) relationship
Author Rick Debay
>>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.

I must point to at least one table. Currently, with only one table to
point to I just have a not-null foreign key.

> BTW, how many tables are you referring to?

It's always been one, which was simple. After lobbying from Sales,
we're supporting two. Now that there is nothing preventing more than
one, there are going to be many more requests in the coming months to
add special features for various current and potential clients.

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Leyne, Sean
Sent: Wednesday, May 26, 2010 5:26 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Many to many (tables) relationship



> 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



------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links




Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.