Friday, September 20, 2002, 12:45:23 PM, you wrote: >> Does anyone prefer Triggers over Stored Procedures to enforce >> business logic? I'm trying to tell some people that SP's are >> better but they wont listen. Maybe I am missing something... >> >> What are the advantages of a trigger over an sp?
DW> Each has advantages and disadvantages. The big advantage of triggers is that DW> they are used no matter what - if the user or application queries tables DW> directly, the triggers will still do their job. This is very important if DW> there's any chance that ad-hoc SQL will be used instead of stored DW> procedures. Personally, I prefer stored procedures because I can usually DW> enforce access limitations to application databases such that ad-hoc or DW> passthrough SQL can't be executed. If that's your environment, stored DW> procedures generally provide advantages in performance and in application DW> structure - data manipulation logic can be nicely intertwined with all DW> database access that way. Thanks, that seems to validate my viewpoint. These guys created an entire table with 6 page long trigger specifically for my application to access their database. It's been a nightmare to work with, and I'm fed up with it and am trying to convince them to go the SP route before we go live. -- jon mailto:[EMAIL PROTECTED] ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists