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: [PL/SQL] Objects

Re: [PL/SQL] Objects

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 11 Sep 2003 01:44:12 -0700
Message-ID: <1a75df45.0309110044.66ad08ef@posting.google.com>


Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl> wrote i

> > try to read about bulk operations with collections (chapter 5
> >of PL/SQL manual on tahiti.oracle.com)
>
> Bulk collect has exactly NOTHING to do with OO

Bulk collect allows Collection Class processing. For example, this does not work.

  1. create an object view
  2. create a PL/SQL cursor of object view
  3. fetching from cursor into object (UDT) row

(BTW I have yet to find a valid PL/SQL variable type to fetch a row/object from an object view from a cursor)

So how then do you process a collection of object? Bulk collect.

  1. create a UDT row object
  2. create a UDT table of row object
  3. bulk collect into variable of type (2)

So, in this regard bulk collect has a everything to do with OO.

The problem here though is that the constructor is called per row, in order to convert the row into type (1). This is far from ideal as the row should be a persistant object with no construction needed - but for that you need to define the object as a column in the table. Compromises and compromises... Wonder if 10G address any of these issues?

--
Billy
Received on Thu Sep 11 2003 - 03:44:12 CDT

Original text of this message

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