When to use collection types in PL/SQL?

Showing Answers 1 - 6 of 6 Answers

ravgopal

  • Oct 10th, 2007
 

The following bullet points can be referred to when deciding what collection best suits a particular solution.

Varray

  • Use to preserve ordered list
  • Use when working with a fixed set, with a known number of entries
  • Use when you need to store in the database and operate on the Collection as a whole

Nested Table

  • Use when working with an unbounded list that needs to increase dynamically
  • Use when you need to store in the database and operate on elements individually

Associative Array

  • Use when there is no need to store the Collection in the database. Its speed and indexing flexibility make it ideal for internal application use.

  Was this answer useful?  Yes

Collection is an ordered group of elements all are of same time. Each element in the collection has unique subscript to identify its position in the collection.
Pl/sql offers three collection types.
1. Nested table
2. Varray
3. Index by table


Use collection types to process all the record in one go or in bulk instead of processing each record sequencially.



  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions