Using REF, DEREF and VALUE
REF and DEREF are Oracle supplied routines that
allow a developer to explicitly reference an object instance. The
call to REF returns the OID of the object instance. An OID is a 128
byte base 64 number which isn't very useful except as a handle to
the object instance. To get the value or values stored in the
instance that is referred to by a REF the DEFREF routine is
utilized. DEREF returns the values in the object instance referenced
by a specific REF value.
REFs are used to establish relationships between
two object tables much like a primary key-foreign key relationship
in relational tables. However, relational tables have difficulty if
you have to have more than one table related in a primary/foreign
key relationship to a single table. An example would be an address
table that is used to store addresses from several entities. The use
of REFs eliminates this problem since an unscoped REF can refer to
any object table that is accessible.