Subject Re[3]: [Firebird-Architect] Re: [IB-Architect] Rebuilding foreign keys system indexes
Author Nickolay Samofatov
Hello, Jim,

> At 04:21 PM 4/22/03 +0400, Nickolay Samofatov wrote:
>>Hi, Jim,
>>
>> > At 10:02 AM 4/22/03 +0200, Martijn Tonies wrote:
>>
>> >>Which reminds me - Oracle also has triggers that fire after each statement
>> >>instead of each row... Also quite a nice addition :)
>>
>> > How are used? I've never understood what they're good for.
>>
>>Simple. Oracle forbids access to a table for which trigger is fired
>>from row triggers. To do some useful work you need to create temporary
>>table in PRE- statement trigger, fill it with work you want to do in
>>row triggers and actually do the work in POST- statement trigger.


> Sounds less like a feature than a workaround for an Oracle bug.

Yes. From my experience I see implementations of triggers in Oracle
and MSSQL very bad. I don't think they should ever be used as a model
for any other DBMS. There are many areas where Oracle rocks and some
where MSSQL is fine. Triggers is surely not among of them. I can show
some examples where trigger of 1-3 lines in Firebird has to be 20-50
lines of stupid, slow and ugly code in Oracle and MSSQL - and this cases
are pretty common.

> Jim Starkey

Nickolay Samofatov