CHAPTER 39Collectors (Nested Tables and Varying Arrays)
Collectors make use of object types. You should be familiar with the creation and implementation of object types (see Chapter 38) before attempting to use varying arrays and nested tables.
Varying Arrays
A varying array allows you to store repeating attributes of a record in a single row. For example, suppose you want to track which of your tools were borrowed by which of your neighbors. You could model this in a relational database by creating a BORROWER table:
create table BORROWER(Name VARCHAR2(25), Tool VARCHAR2(25),constraint BORROWER_PK primary key (Name, Tool));
Even though the borrower's Name value does not change, it is repeated in each record because it is part ...
Get Oracle Database 11g The Complete Reference 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.