GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Programmatic Constructs
Go To First  |  Previous Question  |  Next Question 
 Programmatic Constructs  |  Question 8 of 13    Print  
What  are  the  differences  between  Database  Trigger and Integrity constraints ?
A declarative integrity constraint is a statement about the database that is always true. A constraint applies to existing data in the table and any statement that manipulates the table.
 
A  trigger  does  not  apply  to  data  loaded before the definition of the trigger,  therefore,  it does not guarantee all data in a table conforms to the rules established by an associated trigger.
 
A trigger can be used to enforce transitional constraints where as a declarative integrity constraint cannot be used.



  
Total Answers and Comments: 1 Last Update: January 19, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 19, 2006 04:27:47   #1  
samiksc Member Since: October 2005   Contribution: 233    

RE: What  are  the  differen...

A trigger is a piece of code which gets automatically executed upon occurrence of an event. It may not be meant for enforcing integrity. For example you may want to save the user info as soon as he makes an entry into a particular table. This will be achieved by means of a trigger.

An integrity constraint defines basic rules for a table's columns. It will always be enforced for all data which was there in the table before the rule was added and to the new data which will be added to the table in future.


 
Is this answer useful? Yes | No

 Related Questions

What  are  the  different  types  of PL/SQL program units that can be defined and stored in ORACLE database ?
Procedures and Functions,Packages and Database Triggers.    

A  Procedure consist of a set of SQL and PL/SQL statements that are grouped together  as a unit to solve a specific problem or perform a set of related tasks.    
Latest Answer : Procedure is a named PL/SQL block and a reusable database object which can accept multiple arguments, execute PL/SQL statements, do exception handling and return multiple results. Procedures are stored and executed in the database. ...

A  Package  is a collection of related procedures, functions, variables and other package constructs together as a unit in the database. 

Increased  functionality  (for  example,global  package  variables  can  be declared  and  used  by  any proecdure in the package) and performance 
Latest Answer : pakage having more advantages1)Modularity2)Easily application dision ...

A Database Trigger is procedure (set of SQL  and PL/SQL statements) that is automatically  executed  as  a  result of an insert in,update to, or delete from a table. 

Database  triggers  can  be  used  to automatic data generation, audit data modifications, enforce complex Integrity constraints, and customize complex security authorizations. 

What  are  the  differences  between  Database  Trigger and Integrity constraints ?
A declarative integrity constraint is a statement about the database that is always true. A constraint applies to existing data in the table and any statement that manipulates the table. A  trigger  

Latest Answer : A forms trigger may do nothing more than change the focus to a new item or show a new canvas ...
Read Answers (1) | Asked by : Joyce


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

Performing XSLT Transformations inside the Database

Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr employees table you can create a script that will instruct the database to build an HTML page based on the data stored in hr e
 

Moving All the XML Processing into the Database

Moving All the XML Processing into the Database In the preceding example the database server performs only a part of the XML processing while the rest is still performed by the PHP engine Specifically the database server generates an employees XML document based on the records from the hr employees
 

Performing XML Processing inside the Database

Performing XML Processing inside the Database When building XML enabled applications on top of Oracle there are many advantages to performing the XML processing inside the database when compared to performing it on the client The key advantages to perform XML processing inside the database are as fo
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

Getting Started with Oracle and ODP.NET

ODP NET Developer’ s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

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