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: tough choices

Re: tough choices

From: Noons <wizofoz2k_at_yahoo.com.au.nospam>
Date: Fri, 25 Jun 2004 21:13:56 +1000
Message-ID: <40dc08ed$0$25463$afc38c87@news.optusnet.com.au>


Serge Rielau apparently said,on my timestamp of 25/06/2004 6:48 PM:

> How does Oracle enforce? Hooks in runtime (like procedure calls) or
> "implicit views"? The first would be unfortunate since it would takes
> the optimizer out of the picture, cardinalities get messed up, join
> choices taken away.

to add to what Howard already explained: the policy itself is a PL/SQL stored function, which implements whatever checks you might want.

Of course it is advisable to make sure you don't exactly consult the entire definition of every screw driver in the world if all you want is to make sure the user can read the description of screw drivers you provide. Good, sensible design, will always be needed.

The important bit in here I reckon is to note that it is indeed as flexible as you might want: it is your own code that implements the check, which is then dynamically added to the original SQL as an additional predicate and dynamically re-parsed/re-optimised/ re-executed. No changes whatsoever needed in the original source if tomorrow you decide to change the check function: just compile a new one and it will be automatically picked up. As Howard said: very neat.

It however negates the advantages of DB2 packages (which are not the same as Oracle PL/SQL packages. Just pre-parsed, pre-optimised statements). You can't make an omelette without breaking a few eggs...

-- 
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Fri Jun 25 2004 - 06:13:56 CDT

Original text of this message

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