CHAPTER 7Collections

Collections are arrays and lists—at least, that’s the way we’ve label them since the advent of Java. A collection in an Oracle database acts like an array when you define it as a varray, and it acts like a list when you define it as a nested table or an associative array. The varray and nested table are SQL data types, and they’re indexed initially by sequential integers. This typically means they’re densely populated structures because they don’t have gaps, which is an exception that we’ll discuss in this chapter. Associative arrays differ from nested table because they can have sequential or nonsequential numeric indexes, or string indexes. They’re sparsely populated structures because they may have gaps in their index ...

Get Oracle Database 11g PL/SQL Programming Workbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.