Re: Object-relational impedence

From: S Perryman <>
Date: Thu, 06 Mar 2008 20:08:51 +0000
Message-ID: <fqpj0o$lke$>

Tegiri Nenashi wrote:

> On Mar 6, 9:39 am, S Perryman <> wrote:

>>I am interested in exploring the notion of an 'ADT join' and >>how it might be implemented by an OO prog lang.

> Join is indeed the most interesting operation.

> In the other message
> you dismissed projection as being covered by the concept of
> subclassing.

No. Projection is covered by *type substitutability* .

> Can you please be more specific? If we remove some [data]
> attributes, does it mean the resulting "entity" is a subclass.

No, merely that the resulting entity is now deemed to be of another type, substitutable with the original type.

type T

    x, y, z

Set<T> ts ;
Set< type { x, y } > ps = { e IN ts : e.x > 123 } ;

The elements of ps are effectively projections of the elements in ts.

> Then consider selection. One might be tempted to reason that it is a
> selection that makes a subclass by restricting to a subset of
> objects.

Here you might be talking about what Wegner and Zdonik (1988) termed "subset subtypes" , whereby the set of values applicable to subtype properties is a subset of those applicable to the supertype. Off-hand mental recall of one of their examples :

type Person

    name : string ;
    age : [0..long-time] ;

type Employee

    name : string ;
    age : [16..long-time] ;

The set of Employee instances is a subset of the set of Person instances.

> The duality between rows and columns (tuples and attributes) IMO has
> something to do with those pepetuum motion LSP debates.

Not really.

The "LSP debates" come from the fact that Liskov/Wing types (and subtype relationships thereof) are governed by semantics such as pre/post/invariant conditions. Conflicts between such definitions cause substitutability violations. But sadly are often claimed/confused as issues of "mutability" etc.

Steven Perryman Received on Thu Mar 06 2008 - 21:08:51 CET

Original text of this message