Views, Triggers and Rules

Views are virtual tables in relational databases defined as results of queries.

A trigger is a function that is applied on events in the database, such as insertion, deletion or update events. In case of insertion, the trigger takes the inserted row as argument. On update the trigger takes as arguments both the new and the old row, and on delete it takes the deleted row as argument. The trigger can then use the arguments to perform checks, or start aditional events. Triggers can therefore be used for logging, where each event on particular tables are logged; they can be used for reasoning, where on insert of a new triple, inferred triples are inserted as well, etc.

Rules are specific forms of triggers with a simpler syntax. Rules can be used to redirect queries and commands from one table to another, or replace one event with another.

More information