Re: MV Keys
Date: Tue, 7 Mar 2006 08:27:25 +0100
Message-ID: <MPG.1e7754328c7e8f9e98978d_at_news.ntnu.no>
In article <1141659383.465669.99320_at_u72g2000cwu.googlegroups.com>,
marshall.spight_at_gmail.com says...
> > I agree. Perhaps Marshall meant that if you have RVAs, you don't really
> > need tuple attributes, because you can "simulate" them using a RVA with
> > cardinality one (just like you can "simulate" a list using a
> > relation)---not that a tuple is a special kind of relation?
>
> But isn't a tuple a subtype of a relation?
Not according to the definitions I prefer. I feel uncomfortable with the circularity this would entail: That a relation is a set of relations(?).
> What definition of subtype
> would you care to use? Consisder the defintion of a relation:
> doesn't a tuple qualify?
That depends on which definition you consider "the" definition. I like Date's: A relation consists of a heading (a set of attribute name / domain pairs), and a body, which is a set of tuples conforming to the heading. A tuple is a set of attribute name / domain / value triplets.
As for subtypes, I'm undecided. I like the TTM subtype definition (subset; specialisation by constraint) because it is clean, precise and sound---but it seems a bit useless in practise. :)
> > The operators
> > of the respective type kinds are also rather different, of course.
>
> Can you be more specific? What different operators are there?
(Note that I'm talking about a specific DBMS here; I don't claim this is universal truth.)
- Tuples have an operator (Column Extraction) that returns a value,
given an attribute name. Note that this is not the same as projection:
projection on relations returns a relation, and projection on tuples
returns a tuple (disregarding the fact that tuples and relations are
also values; I hope you know what I mean).
- Tuples also have a join operation that is different from the relation join: If you join two singleton relations, you get a relation with zero or one tuples, depending on whether the common attributes (if any) have the same value. When you join two tuples, you get a run-time error if there are any common attributes that don't have the same values.
--
Jon