Re: Proposal: 6NF

From: vc <boston103_at_hotmail.com>
Date: 14 Oct 2006 06:11:46 -0700
Message-ID: <1160831506.442971.130990_at_h48g2000cwc.googlegroups.com>


Jan Hidders wrote:
> 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.

There are several objections to the paragraph above:

o I do not recall Cardelli/Wegner talking about homomorphisms/algebras in their article. They clearly equate subsets with subtypes, without specifying any additional requirements.

o Involving two sorted algebras in the picture looks, at least at the first glance, as a contrived attempt to salvage the idea that subtyping is "just" subsetting. That very clearly is not the case since one has to talk now about algebraic structures. If one chooses to go this way, the nature of the carrier (the underlying set) would be rather irrelevant and therefore that of of set/subset as well. Whether treating data types as algebraic/categorical is fruitful or not is a complicated matter, but one can hardly claim , if one choses this path, that subtype is just a subset.

>

> 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.

See above, and I do not recall such requirements in the original article. Again, as soon as one starts talking about operations, one will talk about some algebraic structures which makes the 'subtype as subset' simplistic approach look rather passé and naive.

>
> -- Jan Hidders
Received on Sat Oct 14 2006 - 15:11:46 CEST

Original text of this message