Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Qian Dong: "Although I evaluated Oracle Maestro for only a couple of days, I must say I like what I saw in this product. I am going to place an order for this product.

Thank you for the good work".
Bernhard Hartl: "Oracle Maestro works great - thank you for that really good product and the very good User Interface".

More

Add your opinion

Oracle Maestro online help

Prev Return to chapter overview Next

Collections

Collection is an ordered group of elements, all of the same type (for example, the grades for a class of students). Each element has a unique subscript that determines its position in the collection. PL/SQL offers three kinds of collections: associative arrays, nested tables, and varrays (short for variable-size arrays). Nested tables extend the functionality of associative arrays (formerly called "PL/SQL tables" or "index-by tables").

 

Collections work like the arrays found in most third-generation programming languages. Collections can have only one dimension. Most collections are indexed by integers, although associative arrays can also be indexed by strings. To model multi-dimensional arrays, you can declare collections whose items are other collections.

 

Nested tables and varrays can store instances of an object type and, conversely, can be attributes of an object type. Collections can also be passed as parameters. You can use them to move columns of data into and out of database tables or between client-side applications and stored subprograms.

 

 

New collections are created within Create Collection Wizard. In order to run the wizard you should either

 

select the Object | Create Database Object... main menu item;
select the Collection icon in the Create Database Object dialog

or

select the Collection list or any object from that list in the explorer tree;
select the Create New Collection... item from the popup menu

or

open the schema in Schema Editor and the Collection tab there;
press the Insert key or select the Create New Collection item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar).

       

To create a new collection with the same properties as one of the existing collection has:

 

select the Object | Duplicate Database Object... main menu item;
follow the instructions of Duplicate Object Wizard.

 

 

 

Collections can be edited within Collection Editor. In order to run the editor you should either

 

select the collection for editing in the explorer tree (type the first letters of the

       collection name for quick search);

select the Edit Collection ... item from the popup menu

or

open the schema in Schema Editor and the Collection tab there;
select the collection to edit;
press the Enter key or select the Edit Collection item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar).

 

 

 

To drop a collection:

 

select the collection to drop in the explorer tree;
select the Drop Collection item from the popup menu

or

open the schema in Schema Editor and the Collection tab there;
select the collection to drop;
press the Delete key or select the Drop Collection item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar)

 

and confirm dropping in the dialog window.

 



Prev Return to chapter overview Next