| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Is relational theory irrelevant?
But now I sendemail only if the table of addresses is updated.
That's most certainly not what I want.
Triggers are tables specific business logic, what we need to model here
is an application process.
As a user I want to send email to all my Windows 2000 users to warn them
of the newest virus. So I clearly need to exploit predicates.
Once the email has been send I want to log that in an audit table so I
can prove I (IT security) did my job:
INSERT INTO log SELECT user,
sendmail('Beware of virus x', user) as success
FROM inventory
WHERE os = 'W2K';
Note that log is a generic table. It does not know about emails. Tomorrow it will record other activities, such as which machines were upgraded to Linux ;-)
Cheers
Serge
PS: I trust the readers will distinguish between a (silly) example and generalization. So please don't overvalue the chosen schema
-- Serge Rielau DB2 SQL Compiler Development IBM Toronto LabReceived on Wed Nov 19 2003 - 07:50:18 CST
![]() |
![]() |