Object References (Cont.)


The VALUE DML Operator
SQL> SELECT * FROM  persons p; 

             NAME                      SSN         DOB
--------------------------------   ----------   ---------
Powerpuff Girls                     123456789   31-OCT-80
Kids Next Door                      234567890   20-FEB-00


SQL> SELECT  VALUE( p )  FROM  persons p; 

                VALUE(P)(NAME, SSN, DOB)
---------------------------------------------------------
PERSON_TYP('Powerpuff Girls', 123456789, '31-OCT-80')
PERSON_TYP('Kids Next Door', 234567890, '20-FEB-00')

Dangling Reference
It happens if the target object of a REF is removed.

SQL> DELETE FROM  persons p  WHERE  p.ssn = 123456789; 

1 row deleted.

SQL> SELECT  no  FROM  accounts  WHERE  acc_holder  IS DANGLING; 

      NO
  ----------
     1001

The predicate IS DANGLING returns


      “Trees are poems the earth writes upon the sky,    
      We fell them down and turn them into paper,    
      That we may record our emptiness.”    
      ― Kahlil Gibran