Summary


In this chapter, you learned that

  • Collections allow you to store sets of elements.

  • There are three types of collections: varrays, nested tables, and associative arrays.

  • A varray is similar to an array in Java; you can use a varray to store an ordered set of elements with each element having an index associated with it. The elements in a varray are of the same type, and a varray has one dimension. A varray has a maximum size that you set when creating it, but you can change the size later.

  • A nested table is a table that is embedded within another table, and you can insert, update, and delete individual elements in a nested table. Because you can modify individual elements in a nested table, this makes them more flexible than a varray because elements in a varray can only be modified as a whole, not individually. A nested table doesn t have a maximum size, and you can store an arbitrary number of elements in a nested table.

  • An associative array is a set of key and value pairs. You can get the value from the array using the key (which may be a string) or an integer that specifies the position of the value in the array. An associative array is similar to a hash table in programming languages such as Java.

  • A multilevel collection type contains elements that are also collection types.

  • Collections can be manipulated using SQL and PL/SQL.

  • Oracle10 g features many enhancements to collections.

In the next chapter, you ll learn about large objects.




Oracle Database 10g SQL
Oracle Database 10g SQL (Osborne ORACLE Press Series)
ISBN: 0072229810
EAN: 2147483647
Year: 2004
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net