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
Declaring a Cursor The Forward references are not allowed in the PL/SQL. Therefore, you must declare a cursor before referencing it in other statements. Whenever you declare a

SQL Database: So, an SQL database is one whose symbols are organized into a collection of tables. Now, shows an SQL table as the current value of an SQL variable, ENROLMENT, b

Manipulating Individual Elements Faraway you have manipulated an entire collection. Within the SQL, to manipulate the individual elements of the collection, and then use the ope

Subprograms The PL/SQL has two types of subprograms known as the procedures and functions that can take parameters and be invoked. As the following example represents, a subp

Synonyms You can create the synonyms to provide location transparency for the remote schema objects like tables, views, sequences, stand-alone subprograms, and packages. Though,


Biconditional - SQL The biconditional p ↔ q can be expressed in Tutorial D by p = q and the same is true of SQL. The question then arises as to whether, in SQL, p = q is equiv

This is a Customer Management project. Customer data is presented in a text file. The program will load this text data into its DB columns. The data mapping is user definable. User

Relational Algebra - SQL It describes some operators, that together constitute an algebra that is not only relationally complete but also irreducibly so (very nearly- apart f

Use the PLS_INTEGER Datatype When you require to declare an integer variable, use the datatype PLS_INTEGER that is the most efficient numeric type. That is as the PLS_INTEGER