Comparing the collection types
The following table compares the collection types based on the considerations.
Comparing factor |
Nested table |
Varray |
Associative array |
---|---|---|---|
Maximum size |
Unbound and grows dynamically. |
Bounded. However, varray size, can only be increased thereafter. |
Unbound and grows dynamically. |
Sparsity |
Starts dense but may become sparse due to deletions. |
Always dense. |
Can be sparse. |
Storage considerations |
Out-of-line storage in a separate storage table. |
In-line storage up to 4000 bytes. For out-of-line storage, the LOB clause must be specified. |
Non-persistent collection uses program memory that is UGA. |
Querying ability |
A nested table type column can be queried as an instance. However, unnesting of an instance is possible using the |
A varray type column can be queried as an instance. However, unnesting of an instance is possible using the |
Non-persistent collection. |
DML operations |
Piecewise and atomic operations possible... |