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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.