Re: MV Keys

From: Jon Heggland <>
Date: Thu, 2 Mar 2006 15:14:12 +0100
Message-ID: <>

In article <PuCNf.675$ZL1.646_at_trndny09>, says...
> If you have set types and tuple types, do you need to define relations
> separately as a type? Can't you merely define a relation as a set of
> tuples?

Possibly; I think that is mainly a matter of perspective. A relation is constrained to contain tuples of just one tuple type. If we have a set type generator (think the generic Set of Java 5) that can enforce this, it might fit the bill. However, there are at least two issues:

  • An empty relation of one type should not be equal to an empty relation of another type. In Java, all empty sets are equal: new HashSet<String>().equals(new HashSet<Exception>()) evaluates to true.
  • Sets only have set operators. We need relational operators as well; besides, the cartesian product is defined differently (though analogously) for sets and relations. -- Jon
Received on Thu Mar 02 2006 - 15:14:12 CET

Original text of this message