What is a collection, PL-SQL Programming

What Is a Collection


The collection is an ordered group of elements, all of similar type (for e.g. the grades for a class of students). Each element has a unique subscript which determines its position in the collection. The PL/SQL offers two collection types. The Items of type TABLE are either index-by tables or nested tables (that extend the functionality of the index-by tables). The Items of type VARRAY are varrays (short for the variable-size arrays).

The Collections works like the arrays found in most of the third-generation programming languages. Though, collections can have only one dimension and should be indexed by the integers. (In few languages like Ada and Pascal, the arrays can have multiple dimensions and can be indexed by the enumeration types.)

The Collections can store instances of an object type and, on the contrary, can be attributes of an object type. The collections can also be passed as parameters. Therefore, you can use them to move the columns of data into and out of the database tables or between client-side applications and stored subprograms. Moreover, you can define the collection types in a PL/SQL package, and then use them programmatically in your applications.

 

 

Posted Date: 10/3/2012 6:27:23 AM | Location : United States







Related Discussions:- What is a collection, Assignment Help, Ask Question on What is a collection, Get Answer, Expert's Help, What is a collection Discussions

Write discussion on What is a collection
Your posts are moderated
Related Questions
Procedures   The procedure is a subprogram which performs a specific action. You write procedures using the syntax as shown below: PROCEDURE name [(parameter[, parameter, .

Definition of FROM - SQL Recall that the operand of FROM is denoted by a commalist, each element of that commalist being a table expression optionally accompanied by a range v

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean’s wants to create a trigger that automatically updates the stock level of all pr

%FOUND Subsequent to a cursor or cursor variable is opened but before the first fetch, the %FOUND yields NULL. Afterward, it yields TRUE when the last fetch returned a row, or

Name Resolution   During the compilation, the PL/SQL compiler relates identifiers like the name of a variable with an address or memory location, actual value, or datatype. Th

CLOSE Statement The CLOSE statement allows the resources held by a cursor variable or open cursor to be reused. No more rows can be fetched from the cursor variable or closed

Using the Collection Methods The collection methods below help to generalize the code and make collections easier to use and also make your applications easier to maintain:

%FOUND Until the SQL data manipulation statement is executed, the %FOUND yields NULL. Afterward, the %FOUND yields TRUE, when an INSERT, UPDATE, or DELETE statement affected o

PL SQL Code Review HEADER ELEMENTS File Name Clear, meaningful and descriptive about main objective of the file. Multiple words are joined using underscores which adh

Parameter and Keyword Description: EXIT: An unconditional EXIT statement (i.e., one without a WHEN clause) exits the present loop instantly. The Execution resumes with th