Re: Proposal: 6NF

From: Jan Hidders <hidders_at_gmail.com>
Date: 14 Oct 2006 02:59:27 -0700
Message-ID: <1160819966.865052.123830_at_b28g2000cwb.googlegroups.com>


vc wrote:
> Jan Hidders wrote:
> > vc wrote:
> > > Jan Hidders wrote:
> > > > vc wrote:
> > > > >
> > > > > More interestingly, why bother with a trivial fact that Z may be
> > > > > [considered] a subset of R in whatever sense ?
> > > >
> > > > Because you want a simple formalization of subtyping a la Cardelli and
> > > > Wegner where subtyping coincides with being a subset. It means that the
> > > > meanig of the + operation in (a + b) can be considered independent of
> > > > the type of a and b.
> > >
> > > RIght, but my understanding of the OOP stuff leads me to believe that
> > > a subtype should '"inherit" its type operations. If so, assuming R is
> > > our base type, what do we do about division in Z (regarded as an R
> > > subtype) ;) ?
> >
> > Call it integer division to distinguish it from the real division? :-)

>

> Whatever you define as "integer division" cannot be claimed to be the
> division as understood in elementary arithmetic, as well as in abstract
> algebra, and therefore to be "inheritable" from R-division as I imagine
> it should be in the OOP sense of the word. In simpler terms, Z ain't
> a field while R is.

Ah, right, I see your problem. Your reasoning is: (1) there is a division for R and (2) Z is a subtype of R so (3) there must be some inherited division for Z, but (4) Z is not closed under division. What gives?

Well, it's (3) that you should take a closer look at. Is that really true? The answer is: no, if you look at the algebras that define the domains it is not necessarily true that the algebra of the subtype has more operations.

Why is that so? In order to allow Z to be a subtype of R in a database universe we only need to be able to injectively map the elements of Z to elements of R such that it is a homomorphism for presumed identical operations. The latter means for example that if f : Z -> R is the mapping and +_R the real addition and +_Z the integer addtion then it should hold that f(a) +_R f(b) = f(a +Z b). Why is that sufficient? If this holds then we can define a two-sorted algebra that combines the two algebras and their operations such that Z is subset of R. You see that the division for R can then also be used for Z since it has type RxR->R and Z is a subset of R. So, in that sense, it is then "inherited" by Z.

So, summarizing, you see that the requirement is not that the algebra for the subtype should contain all the operations of the the algebra of the supertype.

  • Jan Hidders
Received on Sat Oct 14 2006 - 11:59:27 CEST

Original text of this message