GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics
Go To First  |  Previous Question  |  Next Question 
 Basics  |  Question 5 of 49    Print  
What is the diffrence between and constraints and triggers?

  
Total Answers and Comments: 7 Last Update: August 02, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 09, 2005 08:09:28   #1  
Sunil        

RE: What is the diffrence between and constraints and triggers?
Constraints are used to maintain the integrity and atomicity of database .in other words it can be said they are used to prevent invalid data entry . the main 5 constraints are
NOT NULL PRIMARY KEY FOREIGN KEY UNIQUE KEY and CHECK

Triggers are bascically stored procedures which automaticallly fired when any insert update or delete is issued on table

 
Is this answer useful? Yes | No
September 28, 2005 00:41:20   #2  
rahultripathi Member Since: September 2005   Contribution: 22    

RE: what is the diffrence between and constraints and ...
Another most imp. deff. is that trigger effected only those row after which trigger applied but constraint effected all row of table .
 
Is this answer useful? Yes | No
September 29, 2005 06:45:08   #3  
krishnaveni        

RE: what is the diffrence between and constraints and ...
Generally we cant compare between and constraintsbut the difference between constraints and triggers is already there see.
 
Is this answer useful? Yes | No
May 04, 2006 08:02:47   #4  
Piyushjohn Member Since: April 2006   Contribution: 1    

RE: what is the diffrence between and constraints and ...

Triggers - They start a chain reaction- for instance each delete update action etc. can trigger off another function

Contstraint is set when the application is customized so that there are restrictions to the data entered so that the data is authentic.


 
Is this answer useful? Yes | No
August 31, 2006 22:11:19   #5  
RamaKrishna Yerra,TCS,Hyd,9989018508        

RE: what is the diffrence between and constraints and ...

Both are used for Business Rules...

But the major diff is... Triggers can nt fire on the Pre-Loaded data inthe table where as Constraints can be..

Thanks&Regds

RamaKrishna Yerra TCS Hyd 9989018508


 
Is this answer useful? Yes | No
September 07, 2006 05:27:05   #6  
Ashish        

RE: what is the diffrence between and constraints and ...

Triggers are used to carry out tasks which cant be done using constraints.

For eg:-A change in the sal column of a table should change the tax column in another table.This cant be done using constraints.It has to be done using triggers.Thats where the importance of triggers lie.


 
Is this answer useful? Yes | No
August 02, 2007 05:56:51   #7  
anil kumar        

RE: what is the diffrence between and constraints and ...
Constraints are the conditions it can set while creating the table. To eliminate duplicates not null values and also check the conditions..
Triggers are used when the event occurs.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape