|
-----Original Message----- From: Phil <sublime78ska@yahoo.com> To: midrange-l@midrange.com <midrange-l@midrange.com> Date: Tuesday, August 21, 2001 3:57 PM Subject: RE: triggers within commit cycles >> >Why not use referential integrity to enforce business rules? >> > >> >> You can and should, but RI enforces a limited set of business rules. Rules >> like "a customer must exist before we can create an order" is an RI rule, >> but a rule like "send notification to a vendor whenever on-hand quantity >> falls below low-stock-point or reorder-point" is a trigger type rule. >> > >Ok, I agree completely with this, and is what I do. I thought the >discussion was about using triggers to ensure only 'A' or 'B' was allowed >for a given field. Hmmm. Sorry if you got that impression. I don't recall ever indicating that, but... as for allowing values, that's a check constraint and does not necessarily involve triggers or RI, and (for screen input) can also be done with DDS values clause. Domains (in the design phase) can also be used for this and are generally implemented as check constraints. =========================================================== R. Bruce Hoffman, Jr. -- IBM Certified Specialist - AS/400 Administrator -- IBM Certified Specialist - RPG IV Developer "America is the land that fought for freedom and then began passing laws to get rid of it." - Alfred E. Neuman
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.