At 8:01 PM +1200 5/5/06, Sam Vilain wrote:
Also, I don't agree with the notion of a "header" of each relation. It
has a type for each tuple item, sure, but "header" just sounds like the
sort of thing you want in a ResultSet, not a Relation.
Sam.

A relation's heading is essentially the definition of the relation's structure, and is not redundant if the relation has no tuples in it, which is valid.

A comment I back-logged on #perl6 yesterday suggested that what I was proposing with relations is sort of a retread of what classes are, where each is defined in terms of zero or more named and typed attributes.

I just want to weigh in that I see that as partly true (the same could also be said that it retreads what C structs are), and therefore perhaps some language constructs related to class definitions could be reused with relation definitions.

Perhaps "Relation" in Perl 6 would best be a role and/or meta-class with factory methods that produce other classes with common interface elements, such as all the relational algebra methods, and/or objects each of which has its own class. Under this system, each time you perform an operation like a join, you are potentially making a new class, because its attributes are likely different than its predecessors.

Frankly, with Perl 6 being what it is, there are probably numerous ways to implement what I'm looking for, and I don't exactly know what would be best.

For now I'll just follow the simple path with a single Relation class in Pugs' ext/Relation/ directory for demonstration purposes and evaluate changes later.

-- Darren Duncan

Reply via email to