Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger problem

Re: Trigger problem

From: Holger Baer <holger.baer_at_science-computing.de>
Date: Fri, 04 Mar 2005 10:46:51 +0100
Message-ID: <d09aqc$n59$1@news.BelWue.DE>


Cris Carampa wrote:
> Holger Baer wrote:
>

>> The best way would have been if the only way to delete a row in 
>> myTable was
>> through a package/stored procedure - that avoids the trigger problem 
>> altogether.

>
>
> When I encounter this problem I usually create a view that mirrors the
> table, then I put all the logic in an INSTEAD OF trigger and expose the
> view - not the table - to the application. In that way I can do
> everything I want in the trigger :) Of course this is not an orthodox
> approach but it works for me. I hope it doesn't have side effects (I
> haven't experienced any so far).
>
> Kind regards,
>

Sure, that's possible, but over the last few years I've developed a deep dislike of any application that's not using stored procedures - I believe I read on asktom once that Tom Kyte considers a client application that has select, insert, update, delete somewhere in the code as a bug waiting to happen. Since then none of my applications do DML directly and guess what: in one case I had to frequently change the Workflow over the last year but I could do that without a single change to the client code.

Cheers,

Holger Received on Fri Mar 04 2005 - 03:46:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US