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
Using Aggregation on Nested Tables Example is the most direct translation of its counterpart in the theory book that can be obtained in SQL but it is so over-elaborate that no

Keyword and Parameter Description: label_name: This is an undeclared identifier which optionally labels the PL/SQL block. When used, label_name should be enclosed by the do

Block Structure The PL/SQL is a block-structured language. That is, the fundamental units (procedures, anonymous blocks, and functions) that make up a PL/SQL program are logi

Perform the following queries on the Hospital1.DB using SQL Anywhere (START EARLY!). a. Which patients have purchased the drug "Tylenol"? List the names and addresses. Arrange the

UPDATE Command- SQL Loosely speaking, UPDATE changes some of the column values of some existing rows of its target table. Thus, although some rows disappear from the target an

Effect of Anonymous Columns Now, recall that a VALUES expression denotes a table with undefined column names. If an initial value is to be specified when a base table is creat

Cause of Indeterminacy in SQL One root cause of indeterminacy in SQL lies in its implementation of comparison for equality. For certain system-defined types it is possible for

PITS Depressions in secondary cell wall is called pit. A pit present on the free cell wall surface without its partner is called Blind pit. It consists of 2 parts -

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 whic

Exceptions An exception is the runtime error or warning condition that can be predefined or user-defined. The Predefined exceptions are raised implicitly through runtime system