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
Rephrase Conditional Control Statements When computing a logical expression, the PL/SQL uses short-circuit evaluation. That is, the PL/SQL stops evaluating the expression as s

Parameter Modes   To define the behavior of formal parameters you use the parameter modes. The 3 parameter modes, IN, OUT, & IN OUT, can be used with any subprogram. Though, a

First Step at defining type SID in SQL CREATE TYPE SID AS ( C VARCHAR(5) ) ; Explanation: TYPE SID announces that a type named SID is being defined to the syst

Multiset types - SQL An SQL multiset is what in mathematics is also known as a bag-something like a set except that the same element can appear more than once. The body of an

Implicit Cursors The Oracle implicitly opens a cursor to process each SQL statement not related with an explicitly declared cursor. The PL/SQL lets you refer to the most recen

What are 3 good practices of modeling and/or implementing data warehouses?

Using a Join on 2 tables, select all columns and all rows from the tables without the use of a Cartesian product. Query: SELECT * FROM EMPLOYEE1 JOIN CONTRACT ON EMPLOYEE

Mutual Recursion The Subprograms are mutually recursive if they directly or indirectly call each other. In the illustration below, the Boolean functions odd & even, that dete

I need SQL , WP SQL Expert Project Description: Expert required to modify WP SQL query. Skills required are MySQL, SQL, PHP, Wordpress

PRIMARY KEY: PRIMARY KEY  indicates that the table is subject to a key constraint, in this case declaring that no two rows in the table assigned to ENROLMENT can ever have the