Subject: Object-identity-equality

From: [email-masked] (Munib A Qutaishat)
Date: Sun, 19 Jan 92 10:00:39 -0800

Could you please tell me how I can define the three types of object equality - 
related to the three types of object identity - similar to that defined by 
[Khoshfian and Copeland - OOPSLA'86] pp. 406-416. or the same reference in 
[Zdonik and Mair - Readings in O-O Database Systems, 1990].

Summary and suggestions :
The three types, namely,

1. identity-equality
2. shallow-equality and
3. deep-equality

First type:
Two objects may be identically-equl ( if they are the same object ).

EX.                      o.id       name            dept

 /|\      STUDENT        24961      "AAA"          "COMPUTER"
  |
  |                        =         =              =
  |
 \|/  STUDENT_in_view    24961      "AAA"          "COMPUTER"

I understand from the manual (page 25 ) that this operatore already defined
and can be used in the folowing syntax.

STUDENT.oid  !=  STUDENT_in_view.oid    for inequality
STUDENT.oid  =   STUDENT_in_view.oid    for  equality

------------------------------------------------------------------------------

Second type:
shallow-equal (goes one level deep, by comparing values of the 
components of the objects for identity-equality )

Note: identities are not equal but the subcomponents have the same identity/
they are the same ( shared composit/complex object)

EX.   syntax  by  saying:     TAXPAYER.oid  ==  EMPLOYEE.oid

      TAXPAYER   oid         name       dependents __
   /|\          25533        "AAA"                    \
    |                                                  \__  SON   oid     name
    |           !=            =              =         /          88990   "SSS"
   \|/                                                /
      EMPLOYEE   oid         name       dependents -- 
                44667        "AAA"       

-----------------------------------------------------------------------------

Third type:
deep-equal (recursively traverses both objects in full, comparing 
corresponding components for value equality).
Note: here identities are not equal, but the value of the attributes are
equal ( the same if they have composite objects)

EX.    syntax  by  saying:     PERSON1.oid <=> PERSON2.oid

      /|\   PERSON1         oid           name          age
       |                    98987        "XXX"          25
       |                     
       |                     !=            =             =
       |
      \|/  PERSON2          41101        "XXX"          25

=========================================================================

Any help appreciated  inorder to develop the other two types shallow and 
deep equality. If possible send the operator definitions and how I can
compine them with the POSTGRES compiler.

thank you

Munib A. Qutaishat

[email-masked]