Talk:Database trigger

From Wikipedia, the free encyclopedia

more examples please. thanks!


Imagine if a trigger was a method on an object.. When an object is modified, the trigger method is executed which then calls other objects and maintains invariants in the datastructure (garbage collection). Thus a trigger is nothing more than a precondition of a transaction to a database table (or an object).. However you like to look at it..

Contents

[edit] mutating table errors

We should add an explanation and an example for this problem. Additionally, it may be good to have some information on the behavior of different systems, i.e. can such errors occur or are they prevented. --Stolze 18:15, 19 November 2006 (UTC)

[edit] Microsoft SQL Server 'Inserted' and 'Deleted' Tables

After searching the internet for hours trying to figure out how to access data from the affected rows for conditional-trigger-logic, I stumbled upon MSDN's documentation of Inserted and Deleted tables, which store these values for the trigger incase it needs them. I added a small reference to these tables, but the comments I left could be worked over a little better.

I felt they were relevant here since it is mentioned that Triggers don't have parameters or arguments - thus the user should use the Inserted and Deleted tables for conditional-logic. —Preceding unsigned comment added by Sampsonvideos (talk • contribs) 19:24, 26 September 2007 (UTC)


[edit] No rollback of transactions via trigger?

According to the MSSQL documentation at least their server has the abilitiy to rollback transactions URL: http://msdn.microsoft.com/msdnmag/issues/03/12/DataPoints/ Can someone please check/clarify this? —Preceding unsigned comment added by 141.44.228.148 (talk) 15:08, 11 January 2008 (UTC)

[edit] Triggers in PostgreSQL

This section is a bit vague/confusing. You're left with the question so what triggers does PostgreSQL support? Lunchsure (talk) 20:27, 28 April 2008 (UTC)