RI question
Posted in 1995
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? TIA Jon ------------------------------ Jon C. Vemo jvemo@cyberspace.com Bothell, WA U.S.A.