What is the main purpose of using collections in oracle ?
Index by tables
Nested tables
Variable size ARRAY
Index by tables are user defined data types which is used to store multiple data items. Basically these tables are unconstrained tables. Index by table having two parts, these are value field and key field. In value field, oracle server stores actual data, where as in key field oracle server stores indexes, that’s why index by table having ‘key value’ pairs and also indexes are by default integers, and these indexes are in between negative to positive numbers. This index field behaves like a primary key, it doesn’t accept duplicate values. Generally index by tables are used to improve the performance or application, because these tables are stored in memory area, that’s why these tables are also called a memory tables. Generally to improve the performance of the application, these table indexes are using ‘binary-integer’ data type, so we are creating in two step process. First we are creating type, then only we are creating a variable of that type.
Syntax:-
Step1:- Type typename is table of data type (size) index by binary_integer;
Step2:- Variablename typename;
For Morinformation >>>PL/SQL Index by tables (or) PL/SQL tables (or) associative arrays