Re: MV Keys
Date: Thu, 2 Mar 2006 15:14:12 +0100
In article <PuCNf.675$ZL1.646_at_trndny09>, dcressey_at_verizon.net 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
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