# Re: Object-relational impedence

From: Yagotta B. Kidding <ybk_at_mymail.com>
Date: Sun, 9 Mar 2008 18:13:51 +0100 (CET)
Message-ID: <Xns9A5C86B49BE68vdghher_at_194.177.96.26>

S Perryman <q_at_q.com> wrote in news:fr0hft\$8gf\$1_at_aioe.org:

```>> S Perryman <q_at_q.com> wrote in news:fqpj0o\$lke\$1_at_aioe.org:
```

>
> TN>In the other message
> TN>you dismissed projection as being covered by the concept of
> TN>subclassing.
>
> SP>No. Projection is covered by *type substitutability* .
>
> TN>Can you please be more specific? If we remove some [data]
> TN>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.
```

>
```>> Hold on, you have a value of type Set<T> assigned to a variable of
>> type Set<type{x,y}>.
```

>
> Basic type substitutability (structural equivalence) .
> The { x, y } type has properties in common with T (the x/y properties)
> . Therefore the assignment is legal.
>
> So the assignment is a projection is of a type (x,y,z) to a type (x,y)

In any OO langauage I am familiar wth, you can assign a subtype value to a supertype variable. However, you did not establish any subtype/supertype relationship in your example, therefore, the assignment is illegal.

.
>
>
> Regards,
> Steven Perryman
>
Received on Sun Mar 09 2008 - 18:13:51 CET

Original text of this message