Path: utzoo!attcan!uunet!husc6!mailrus!ames!lll-lcc!unisoft!mtxinu!sybase!jeffl From: jeffl@sybase.sybase.com (Jeff Lichtman) Newsgroups: comp.databases Subject: Re: Referential Integrity Message-ID: <2481@sybase.sybase.com> Date: 24 Dec 88 20:03:45 GMT References: <560@bloom.UUCP> Organization: Sybase, Inc., Emeryville, CA Lines: 21 > Why don't any of the RDBMS packages we all know and love REALLY support > referential integrity?? Sybase supports referential integrity, although the syntax is not anything like what you showed. With Sybase, you can put a trigger on a table which will be executed whenever the table is updated. Within triggers, one can tell which columns have been updated and select the newly inserted and deleted rows. Here is an example of a cascading delete trigger: create trigger student_delete on student for delete as delete enrollment from enrollment, deleted where enrollment.student_id = deleted.student_id As I said, the syntax isn't the same. There main advantage to this approach is that the integrity conditions and actions can be arbitrarily complex. That is, you're not limited to simple existence checks or simple cascade and block actions. -- Jeff Lichtman at Sybase {mtxinu,pacbell}!sybase!jeffl "Saints should always be judged guilty until they are proved innocent..."