Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> comp.databases.theory -> Re: curiousity of sets of no relations?
paul c wrote:
> In his Intro to DB, 8th Ed., page 195 in the Relational Algebra chapter,
> CJ Date says:
>
> (Quote, with point numbers added and asterisks for footnotes)
> Some Generalizations
>
> JOIN, UNION, and INTERSECTION were all defined originally as dyadic
> operators (i.e., each took exactly two relations as operands);* as we
> have seen, however, they can be unambiguously generalized to become
> n-adic operators for arbitrary n> 1. But what about n=1? Or n=0? It
> turns out to be desireable, at least from a conceptual point of view, to
> be able to perform "joins", "unions", and "intersections" of (a) just a
> single relation and (b) no relations at all (even though Tutorial D
> provides no direct syntactic support for any such operations). Here are
> the definitions. Let s be a set of relations (all of the same relation
> type RT in the case of union and intersection). Then:
>
> (1) If s contains just one relation r, then the join, union, and
> intersection of all relations in s are all defined to be simply r.
>
> (2) If s contains no relations at all, then:
>
> (2.1) The join of all relations in s is defined to be TABLE_DEE (the
> identity with respect to join).
>
> (2.2) The union of all relations in s is defined to be the empty
> relation of type RT.
>
> (2.3) The intersection of all relations in s is defined to be the
> "universal" relation of type RT - that is, that unique relation of type
> RT that contains all possible tuples with heading H, where H is the
> heading of type RT.**
>
> * MINUS is dyadic, too. By contrast, restrict and project are monodic
> operators.
>
> ** We note in passing that the term universal relation is usually used
> in the literature with a very different meaning. ...
>
> (End of quote)
>
> In the exercises for that chapter (#7.10), Date asks "Given that
> intersect is a special case of join, why do not both operators give the
> same result when applied to no relations at all?"
>
> My guess at the motivation for all this is that it is at least partly to
> define things completely enough to allow prefix notation, eg.
> JOIN/INTERSECT/UNION (r1, r2, ... , rn). If that's so, then I can see
> that we would want JOIN() (by this I mean the JOIN of nothing) to give
> TABLE_DEE, if we wanted (JOIN())JOIN(r1) to give r1. Similarly for
> INTERSECT() and other combinations of the three operators.
>
> That seems a practical motivation. In terms of relations and/or set
> theory/predicate calculus can anybody give a more theoretical one?
He simply defined them as the identity elements for the specific operations just as one defines any aggregate/fold of zero elements using the identity element for the base operation. Received on Sat Jun 10 2006 - 11:11:05 CDT