GeekInterview.com
Series: Subject: Topic:
Question: 117 of 214

What is the advantage to use trigger in your PL?

Asked by: Interview Candidate | Asked on: Jun 21st, 2006
Showing Answers 1 - 3 of 3 Answers
Aparna Akella

Answered On : Jul 17th, 2006

Triggers are fired implicitly on the tables/views on which they are created. There are various advantages of using a trigger. Some of them are:

- Suppose we need to validate a DML statement(insert/Update/Delete) that modifies a table then we can write a trigger on the table that gets fired implicitly whenever DML statement  is executed on that table.

- Another reason of using triggers can be for automatic updation of one or more tables whenever a DML/DDL statement is executed for the table on which the trigger is created.

- Triggers can be used to enforce constraints. For eg : Any insert/update/ Delete statements should not be allowed on a particular table after office hours. For enforcing this constraint Triggers should be used.

- Triggers can be used to publish information about database events to subscribers. Database event can be a system event like Database startup or shutdown or it can be a user even like User loggin in or user logoff.

Yes  1 User has rated as useful.
  
Login to rate this answer.
chennoju

Answered On : Aug 3rd, 2006

View all answers by chennoju

The main advantages of the triggers are

* To Audit the table

* To check the complex conditions which are not possible by the constraints.

  
Login to rate this answer.
bhagya

Answered On : Feb 10th, 2012

1.Auditing the tables
2.Online transaction
3.Securing from another table
4.Automatic calculations
5.Replicate the tables

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.