Home     DB      Replicator      CRM      Solutions  

License Policy
One$ DB FAQ
Pricing Policy
Support Overview
Features
Documentation
Compatible Products
Data Migration
Features Comparison
Performance Comparison
Daffodil DB
User Guide > Features > Comprehensive Triggers
 
Database Triggers in Daffodil DB


Daffodil DB database trigger permits you to define procedures that are implicitly executed when an INSERT, UPDATE, or DELETE statement is issued against the associated table. These procedures are called database triggers.

Database triggers can offer easy-to-implement solutions for the most complicated database problems. Tracking unauthorized changes in a database can be transformed from a lengthy and difficult security task to an automated routine with the use of database triggers. The secret is to store data about each change as it occurs so that you can determine when and where the changes are made. The result of this tracking help you determine whether a data change is a simple mistake in reporting, an unintentional mistake by an honest employee, or a real security loophole that needs to be taken care of.

Knowing about the occurrence of an error is useless unless you can identify its source and prevent its recurrence. This article shows how Daffodil DB triggers can serve as a routine auditing procedure that tracks errors and finds out whether they are due to human error or program logic. You will learn how quickly database triggers can help you track down errors or simply create a historical record of normal processes.

The execution of a trigger is transparent to the user. Triggers are executed by the database when definite types of data manipulation commands are executed on the tables. Specific columns in a database can also be updated with the use of triggers.

The main benefit of triggers is that they react automatically to a specific type of modification made to a specific table. Keep the following rules in mind when you are adding a trigger:

  • Only the table owner has permission to create triggers and the permission cannot be transferred.
  • A trigger is considered as a database object. Therefore, use object rules when naming and referencing a trigger.
  • A trigger can reference a temporary table but cannot modify one.
  • A trigger cannot reference a system table.

 

Uses of Triggers

Database triggers can supplement the usual capabilities of Daffodil DB to offer a highly customized database. For example, a trigger can limit DML operations against a table to those issued during a particular time. A trigger could also restrict DML operations in particular cases. Other uses for database triggers are:

  • Automatically generate derived column values
  • Prevent invalid transactions
  • Enforce complex security authorizations
  • Enforce referential integrity across nodes in a distributed database
  • Impose complex business rules
  • Provide sophisticated auditing
  • Maintain synchronous table replicates
  • Collect statistics on table access

Types of Triggers

Daffodil DB supports Triggers of following types,

 

 
Web Database | SQL Database | Embedded Database
©2006 Daffodil Software Ltd. Contact Us | Disclaimer | Sitemap