Records and Collections

My instructor led training from Oracle is over. Tomorrow I take the first of two tests needed to get Oracle certified. I feel like I have learned a lot over the past week. There is still a little more review required.

I want to go back over some things I learned on the second day of my training. This covered PL/SQL records and collections. Both of these structures are stored in memory.

A record is like a database table. However the record holds one row of information to make the analogy accurate. And a collection is like the columns of a database table.

Records can be composed of a number of things, including other records. However they are usually composed with scalars (such as NUMBER, CHAR, etc). The reason for using collections is so you can treat the whole collection as a unit.

I will speak briefly about the collection type "index-by table" here. These are also called associative arrays. Previously I believe they were called PL/SQL tables. These are essentially hash tables. They contains pairs of keys plus values. The values can be NULL. Each pair is an association. The keys are unique, but can be sparse.