|
> From: rob@xxxxxxxxx > > I agree with validity checking in one place. However I disagree about an > I/O module for it. The validity checking could be in proper setup of the > database. And I disagree that databases are designed to handle business rules. You end up writing business logic in trigger programs, which is not what they were intended to do. > For instance with constraints and/or triggers then any updates > done with any tool are checked. And there is NO leak from someone who > accessed the file without using the I/O module. Personally, I've come to embrace the idea of using both. Since triggers and referential integrity really amount to writing business logic in separate places, I prefer to combine all that logic in one I/O module around each file (or group of related files), and then exclude all access except through that module. I only make files accessible as necessary, and for those files I do have to leave open to the public, I can put a trigger on them. If the trigger senses an attempt to access the file OTHER than through the I/O module, it denies the request. Simple, clean, and all my business rules are in one piece of code. This is the best of both worlds. This also allows the easy implementation of things like row-level security and other features that DB2/400 doesn't support natively. Joe
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.