Re: Functions and Relations

From: Sampo Syreeni <decoy_at_iki.fi>
Date: Tue, 21 Nov 2006 13:52:16 +0200
Message-ID: <Pine.SOL.4.62.0611211345370.4310_at_kruuna.helsinki.fi>


On 2006-11-19, NENASHI, Tegiri wrote:

>> Similarly normal predicates like less-than can be represented as
>> relations on two copies of any domain with equality. Then all you'll
>> ever need are equijoins.
>
> Please explain, I do not understand. Is it not that the predicate '<'
> is interpreted like a relation ?

Yes. But the point is, the relation is of no use unless you can join stuff with it, and that necessarily calls for an equality predicate on the domain. Once you have that, having '<' on the domain allows <-joins to be handled as a two-sided equijoin with the (potentially infinite) <-relation. The neat part is that sometimes you actually want the user to be able to implement the comparison operator, and it's even conceivable that someone would want to use a finite one which could be materialized as a bona fide relation, so the example might not be *totally* artificial.

-- 
Sampo Syreeni, aka decoy - mailto:decoy_at_iki.fi, tel:+358-50-5756111
student/math+cs/helsinki university, http://www.iki.fi/~decoy/front
openpgp: 050985C2/025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2
Received on Tue Nov 21 2006 - 12:52:16 CET

Original text of this message