File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes what is trigger ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "what is trigger ?" Watch "what is trigger ?" New topic
Author

what is trigger ?

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 438
hi, good day, what is trigger and how to implement it in java environment, when should we use it ? thank you
todd runstein
Ranch Hand

Joined: Feb 15, 2005
Posts: 64
A trigger (in databases anyway) are fired when something happens in the database. For example, you can add a trigger when someone updates a record in a table - perhaps it checks to ensure that the record is less than 2 weeks old, or the trigger should make the update fail.

You set the trigger in the database - affecting the database from Java will fire the trigger (by the database). The nice thing about triggers is that they will fire regardless of how you're affecting the database (from Java, from Perl, from a command line utility, etc).

Hope that helps. If it doesn't, tell us more about what you're trying do, why you're asking, or in what context you're using the term "trigger".
Sripathi Krishnamurthy
Ranch Hand

Joined: Mar 07, 2005
Posts: 232
Originally posted by Nakata kokuyo:
hi, good day, what is trigger and how to implement it in java environment, when should we use it ? thank you


In simple terms, trigger is a implicit procedure that gets executed when an insert, update or delete is done on a table/view.
A trigger can be executed before or after the insert, update or delete statement gets executed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is trigger ?