Re: Declaring super types
Date: Wed, 21 Apr 2010 08:44:03 -0700 (PDT)
Message-ID: <8bdd6aa3-4a06-4db5-b087-13c0ee839886_at_n33g2000pri.googlegroups.com>
On Apr 20, 3:03 pm, r..._at_raampje.lan (Reinier Post) wrote:
> Vadim Tropashko wrote:
> >On Apr 19, 1:06 pm, r..._at_raampje.lan (Reinier Post) wrote:
> >> ... "is a" does have a simple, useful and consistent
> >> definition for the relational model: for relvars R, S, we can write
>
> >> R is a S
>
> >> as a shorthand for:
>
> >> + all attributes of S are attributes of R;
> >> + those attributes are a (possibly super)key of R, and
> >> + R projected on those attributes is always a subset of S.
> >> ...
>
> >Are you saying
>
> >"R is a S"
>
> >is eqivalent to
>
> >"R join S = R"?
>
> Hmmm ... that seems a nice shorthand for the first and third clause,
> but it doesn't imply the second one.
Well, let's approach this question from math perspective. I suggest the "is a" is some [partial] order between a pair of relations, so it has to honor 3 laws:
R < R
R < S & S < R -> R = S
R < S & S < T -> R < T
One can prove that the order defined via join satisfies all them. The first one follows from join idempotence,
R ^ R = R
the second one from join symmetry,
R ^ S = S ^ Y
There are two more idempotent symmetric relational algebra operations (one is D&D <AND>) that give rize to some other order relations. However, there is the strong reason to suspect that the order defined by join is the most important one (and, therefore, is candidate to represent "is a"). This is because the order introduced via generalized union (or relational algebra projection) coinsides it!
So, you are suggesting that your definition gives rize to yet another order relation? Can you prove its three defining properties? Received on Wed Apr 21 2010 - 17:44:03 CEST
