1 Collection
1 Collection
A collection is a composite type used to store group/array of values of same data type.
Collections are mainly used to simplify the code. Storing values in collection will allow us to loop
through each element with ease, referencing each one by index.
Collections are list, which may be ordered or unordered.
Ordered list are indexed by unique subscripts.
Unordered lists are indexed by unique identifiers, which may be numbers, hash values, or
string names.
Collections improve application performance because we cache data that is regularly used
which will reduce the calls to database.
Types of Collections:
Varrays.
Nested tables.
Index – by tables (Associate arrays).