multifield table relationships

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to establish, say, a two-field relationship between 2 tables in which 1 of the fields in the child table is a foreign key present in the parent table, but the other would be provided programmatically at run time

The situation is this: I have a table which contains detail information for several "types" of things. These things each have their own table to hold their summary info. The detail table has a 2 field primary key: EntityID and EntityType. EntityID is the primary key of each of the summary tables, but is not unique across all the summary tables. Rather than create a field called "EntityType" in eacvh of the summary tables (which would by definition be identical in all records in that table), I'd like to just pass its value by code into the relationship at runtime. Is it possible? How

Thanks

Pat
 
yust a thought

i'm sertain it is possible but i fear you are heading for a nightmare.

try to model your database rationally have a table thingtype thing (and if
the things don't have much incommon a table thingValue), but get the things
in 1 table this will save you a lot of trouble. you would define the kind of
thing w the thingtype.

hope it helps a bit

eric

pmcguire said:
Is it possible to establish, say, a two-field relationship between 2
tables in which 1 of the fields in the child table is a foreign key present
in the parent table, but the other would be provided programmatically at run
time?
The situation is this: I have a table which contains detail information
for several "types" of things. These things each have their own table to
hold their summary info. The detail table has a 2 field primary key:
EntityID and EntityType. EntityID is the primary key of each of the summary
tables, but is not unique across all the summary tables. Rather than create
a field called "EntityType" in eacvh of the summary tables (which would by
definition be identical in all records in that table), I'd like to just pass
its value by code into the relationship at runtime. Is it possible? How?
 
Back
Top