REFERRENTIAL INTEGRITY QU
Posted in 1995
> From: jvemo@cyberspace.com (Jon C. Vemo) J> What is the best approach to insure referrential integrity at the server, ^^^^^^ Lloyds' of London? 8-) Seriously... > between two tables when: > - The parent table (tab1) has a primary key on (col1,col2), > and contains many rows with duplicates in col1 > - The child table (tab2) contains (col1) values with a > contraint > before an > insert or update (i.e. tab2.col1 values must exist in tab1.col1 I'm having a little trouble understanding the relationship between tab1 and tab2, and why you are not inheriting the entire foreign key (col1, col2) in tab2. I would ensure ri in the data model through primary/foreign key relation- ships. Enforce in the schema. Tim --- ~ SPEED 1.40 [NR] ~