Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!dptg!ulysses!andante!alice!debra From: debra@alice.UUCP (Paul De Bra) Newsgroups: comp.databases Subject: Re: Ingres and referential integrities Keywords: Ingres referential integrities Message-ID: <9677@alice.UUCP> Date: 25 Jul 89 13:59:58 GMT References: <3081@rti.UUCP> <3225@rtech.rtech.com> Reply-To: debra@alice.UUCP () Distribution: comp Organization: AT&T, Bell Labs Lines: 52 In article <3225@rtech.rtech.com> robf@squid.UUCP (Robert Fair) writes: }Lynn writes: }>I'm curious as to why Ingres doesn't provide referential integrities. }>I'm aware that you can build in referential constraints through QBF }>and VIFRED but not as part of the data definition. Does anyone know }>why Ingres chose not to provide this part of the relational model? }> }>Thanks, }>Lynn } }If you mean single-table constraints, INGRES has had them for many }years, for example: } } CREATE INTEGRITY ON employee IS age>15 AND age<75; } }will enforce the integrity that all employees are between 15 and 75. } }Starting with release 6, multi-table update integrity can be enforced by }using database procedures, typically linked updates are coded using }dbprocs similar to: } } [example procedure deleted] } }Robert Fair }Relational Technology }Technical Support. Well, it doesn't look good if RTI's technical support doesn't even know what referential integrity means, does it? Now, as far as i know, it means the following: given for instance 2 relations: EMP (EMPNO, DNO) employees with their department DEPT(DNO, MANAGER) departments with their manager Then referential integrity (given EMPNO is a key in EMP and DNO a key in DEPT) would imply that EMP cannot contain a DNO which does not occur in DEPT. There should be no need for procedures or other low-level tricks to enforce this constraint. In a hierarchical database the link between the DNO's in EMP and in DEPT would come natural, and referential integrity is therefore easy. In a relational database there is no automatic link between the two DNO's which makes it harder to implement referential integrity. Paul. -- ------------------------------------------------------ |debra@research.att.com | uunet!research!debra | ------------------------------------------------------