| 
Characteristic | 
Associative Array | 
Nested Table | 
Varray | 
| 
Dimensionality | 
Single | 
Single | 
Single | 
| 
Usable in SQL? | 
No | 
Yes | 
Yes | 
| 
Usable as column datatype in a table? | 
No | 
Yes; data stored "out of line" (in separate table) | 
Yes; data stored "in line" (in same table , if < 4,000 bytes) | 
| 
Uninitialized state | 
Empty (cannot be null); elements undefined | 
Atomically null; illegal to reference elements | 
Atomically null; illegal to reference elements | 
| 
Initialization | 
Automatic, when declared | 
Via constructor, fetch, assignment | 
Via constructor, fetch, assignment | 
| 
Subscript Limit | 
BINARY_INTEGER (-2,147,483,647 .. 2,147,483,647) | 
Positive integer between 1 and 2,147,483,647 | 
Positive integer between 1 and 2,147,483,647 | 
| 
Sparse? | 
Yes | 
Initially, no; after deletions, yes | 
No | 
| 
Bounded? | 
No | 
Can be extended | 
Yes | 
| 
Means of extending | 
Assign value to element with a new subscript | 
Use built-in EXTEND procedure (or TRIM to condense), with no predefined | 
No | 
| 
Can be compared for equality? | 
No | 
Yes, from Oracle Database 10g | 
No | 
| 
Can be manipulated with set operators? | 
No | 
Yes, from Oracle Database 10g | 
No | 
| 
Retains ordering and subscripts when stored in and retrieved from database? | 
N/A | 
No | 
Yes | 
Monday, 28 October 2013
Comparing Oracle Collection Types?
Labels:
PLSQL
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment