Varray Concepts - Quiz Explanation

The answers you selected are indicated below, along with text that explains the correct answers.
 
1. In what forms can Oracle store a varray?
Please select the best answer.
  A. BLOB only
  B. Raw data only
  C. Both raw data and BLOB
  D. Neither raw data nor BLOB
  Answer C is correctHow to store a varray is decided by Oracle, and it depends on the total size of the declared varray. If the total size does not exceed 4 KB, Oracle stores the varray as raw data. Otherwise, Oracle stores it as BLOB data. Hence, answer C is correct. Answer A is incorrect because Oracle can store a varray as either BLOB or raw data depending on the total size of the declared varray. Similarly, answer B and answer D are incorrect.

2. What explains why it is more efficient to use a nested table than a varray?
Please select the best answer.
  A. A nested table allows you to update parts of the data, whereas updating parts of the data is not allowed within a varray.
  B. A varray allows you to update parts of the data, whereas updating parts of the data is not allowed within a nested table.
  C. Neither a varray nor a nested table allows you to update parts of the data.
  D. Both a varray and a nested table allow you to update parts of the data.
  Answer A is correct.Oracle allows you to update parts of the data within a nested table. However, this is not the case for a varray. Given this feature, it is more efficient to use a nested table than a varray. Thus, answer A is correct. Answer B is incorrect because the reverse is true; that is, a nested table allows you to update parts of the data, whereas updating part of the data is not allowed within a varray. For the same reasons, answer C and answer D are incorrect.

3. If the application requires querying and modifying the entire collection, which collection, nested table or varray is the better alternative?
Please select the best answer.
  A. A nested table is the better alternative.
  B. It does not matter, you can use either.
  C. Neither are good alternatives.
  D. A varray is the better alternative.
  Answer D is correct. A nested table allows you to update parts of the data, whereas updating parts of the data is not allowed within a varray. Therefore, if the application requires querying and modifying the entire collection, a varray is the better alternative. Hence, answer D is correct. If the collection defined within the application is very large and you need to query and modify only a subset of the data stored within the collection, a nested table is a better choice. Hence, answer A is incorrect. It does matter what collection you use, so answer B is incorrect. Depending on the application, a nested table may be a better alternative over a varray or vice versa, so answer C is incorrect.