Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!wuarchive!psuvax1!psuvm!auvm!AUVM!PBURKE From: PBURKE@AUVM.BITNET (Patty Burke) Newsgroups: bit.listserv.db2-l Subject: Referential Integrity Message-ID: Date: 8 Feb 90 17:52:56 GMT Sender: DB2 Data Base Discussion List Reply-To: DB2 Data Base Discussion List Lines: 13 Approved: NETNEWS@AUVM Gateway Suppose I try to insert three foreign key values into a table and two of the values don't exist in their respective parent tables. Would DB2 give me a negative SQLCODE for the integrity violation on EACH column ? It would be nice if the application could highlight the invalid columns with individual messages based on return codes from DB2. I've heard that it's preferable to let DB2 do RI whenever possible. What is the least costly way to do this kind of integrity checking where more than one violation per 1-row insert is possible? (We don't have the product installed, so there's no way for us to test this kind of thing out yet, but programmers are already assuming that their best bet is to do their own RI programming)