Subject | RE: [firebird-support] Many to many (tables) relationship |
---|---|
Author | Rick Debay |
Post date | 2010-05-27T15:38:10Z |
Currently each result has foreign keys that point to the inputs and the
parameters for the algorithm that processed the inputs.
Results table
-------------
ID,R1,Rn,FK_to_inputs,FK_to_parameters
Parameter table
---------------
ID,P1,Pn
Now I need to be able to have more than one parameter table. Each
result needs to be associated with only one of the many tables. The
first idea would be to just normalize the many potential parameter
tables, since they must all supply similar information to the algorithm.
However, the tables aren't that simple and I don't want to conflate
similar types that actually have different meanings.
Results table
-------------
ID,R1,Rn,FK_to_inputs,FK_to_parameters1, FK_to_parameters2...
I'm thinking this may be what I'll end up with, and once the third table
gets added then I'll have to reexamine the whole data model. The
drawback, besides it being a kludge, is that in order to require that a
relationship exists I'll need to use a trigger instead of just requiring
the FK to be not-null.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Michael Ludwig
Sent: Wednesday, May 26, 2010 5:35 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Many to many (tables) relationship
Rick Debay schrieb am 26.05.2010 um 16:59:03 (-0400):
problem description. Consider providing an example.
--
Michael Ludwig
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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.
parameters for the algorithm that processed the inputs.
Results table
-------------
ID,R1,Rn,FK_to_inputs,FK_to_parameters
Parameter table
---------------
ID,P1,Pn
Now I need to be able to have more than one parameter table. Each
result needs to be associated with only one of the many tables. The
first idea would be to just normalize the many potential parameter
tables, since they must all supply similar information to the algorithm.
However, the tables aren't that simple and I don't want to conflate
similar types that actually have different meanings.
Results table
-------------
ID,R1,Rn,FK_to_inputs,FK_to_parameters1, FK_to_parameters2...
I'm thinking this may be what I'll end up with, and once the third table
gets added then I'll have to reexamine the whole data model. The
drawback, besides it being a kludge, is that in order to require that a
relationship exists I'll need to use a trigger instead of just requiring
the FK to be not-null.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Michael Ludwig
Sent: Wednesday, May 26, 2010 5:35 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Many to many (tables) relationship
Rick Debay schrieb am 26.05.2010 um 16:59:03 (-0400):
> I have to represent a relationship between a result set which isDon't know about others, but I, for one, can't make sense of your
> 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.
problem description. Consider providing an example.
--
Michael Ludwig
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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.