You need a 3rd table that has a unique primary key of col1 only. This is
then a parent of table1 and table2. You cannot have multiple parent records
in a parent child relationship.
At 04:57 pm 30/11/95 -0800, you wrote:
}I have a question. I'm interested in hearing how other people have
}addressed this issue (if at all).
}
}I'm trying to enforce RI through the following means.
}
}A parent table (TABLE1) has a primary key defined, which is composed of
}col1, col2, and col3. The child table (TABLE2) has a foreign key defined on
}col1, which references (TABLE1.col1).
}
}This however does not work, since the primary key on TABLE1 is
}(col1,col2,col3).
}
}How best to enforce RI ?? I could carry TABLE1.col2 and col3 in TABLE2,
}then be able to create the foreign key reference, but I really don't need
}to carry col2 and col3 in TABLE2. I thought there may be a way to create a
}trigger to enforce, but I have not used triggers, so I'm not sure how.
}
}Anyone have any good ideas?
}
Dominic Pratt