home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / sybase / 330 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.2 KB  |  30 lines

  1. Newsgroups: comp.databases.sybase
  2. Path: sparky!uunet!utcsri!newsflash.concordia.ca!mizar.cc.umanitoba.ca!mona.muug.mb.ca!dmenns
  3. From: dmenns@muug.mb.ca (Darren Enns)
  4. Subject: Recursive Table Trigger Protection?
  5. Message-ID: <1992Nov17.001711.8509@muug.mb.ca>
  6. Sender: dmenns@muug.mb.ca
  7. Organization: Manitoba Unix User Group, Winnipeg, Manitoba, Canada
  8. Distribution: comp.databases.sybase
  9. Date: Tue, 17 Nov 1992 00:17:11 GMT
  10. Lines: 18
  11.  
  12. Greetings all.  As new situations arise in our very immature Sybase environment
  13. we DBA's try to protect the integrity of our data using triggers.  The newest
  14. pickle we have encountered is the classic recursive table.  We feel that we
  15. should try to protect the table from a looping recursive relationship, but
  16. we don't know of any 'clever' way to do so.  Please help if you can.
  17.  
  18. For the specific example, we have essentially a 'region' table where regions
  19. are contained in other regions (and are connected via foreign keys).  For
  20. example, let me use an 'American' example:
  21.  
  22. California is a region in the United States
  23. The United States is a region in North America
  24. North America is a region of the World
  25.  
  26. An error would now be if the World was a region of California.
  27.  
  28. Dare
  29.  
  30.