Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: NESTED RELATIONAL DATABASES
Jeremy Rickard (Jeremy_at_jbdr.demon.co.uk) wrote: : Is that so obvious - you could use UDFs for this too?
Yes.
When you add a UDT that can be indexed with a b-tree, for example, you simply need to write a function cmp(T,T') that returns -1 if ( T < T' ), 0 if ( T == T' ), and 1 if ( T > T' ). Then the generic b-tree algorithm can deal with the data. This general scheme works within Postgres, (and Illustra, and the Informix Universal Server, and IBM's DB/2).
Of course, this suggests that the overhead of executing the cmp() routine must be very, very small, and it must run really, really fast. This means that the routine needs to run 'as close to the silicon as possible' (i.e. compiled) and it needs to run in the context of the DBMS process.
KR
Pb Received on Mon Oct 06 1997 - 00:00:00 CDT