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: Q: VARRAY vs. Nested tables?

Re: Q: VARRAY vs. Nested tables?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 14 Oct 1999 08:03:38 -0400
Message-ID: <J8YFOFO+R2Y9j+VryJI1VZS3qK3d@4ax.com>


A copy of this was sent to gox <gox_at_tcp.co.uk> (if that email address didn't require changing) On Thu, 14 Oct 1999 00:33:16 +0100, you wrote:

>On Wed, 13 Oct 1999 19:40:01 GMT, jlbenc_at_my-deja.com wrote:
>
>>Hello,
>>
>>I would like to know which method is more reliable to use in storing
>>complex data related to a record in Oracle 8i: VARRAY or Nested tables?
>>
>>Somebody told me that there are some data-loss issues when
>>exporting/importing tables. Is this true?
>>
>>Thanks!!
>>
>>JLB - [para goriberto]
>I always use Nested Tables. You have to be aware with the fact they
>are sparse dynamic lists, deleted items are not packed, so you have to
>loop through checking for nulls entities.

nested tables are packed upon putting them back into the database. If you delete the i'th entry of a nested table in a plsql variable, it will not compact that instance of that variable but if you put it back into the database and then subsequently read it back out -- it will be packed.

> But VARRAYs are static so
>less flexible.
>

static? don't understand that. do you mean they have a fixed maximum number of elements as opposed to a nested table which does not?

>Gox

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Oct 14 1999 - 07:03:38 CDT

Original text of this message

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