Re: Proposal: 6NF
Date: 14 Oct 2006 06:43:26 -0700
Message-ID: <1160833406.311099.17790_at_k70g2000cwa.googlegroups.com>
vc schreef:
> Jan Hidders wrote:
> >
> > 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.
And so do I. What I have shown is what as a consequence the requirements are for the two types specified as algebras. Cardelli and Wegner didn't deal with that because they immediately started with a model where the subtypes are already modeled as subsets.
> 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.
Indeed. And what I've shown you is what the corresponding requirement in the algebra setting is, so what in one setting is a simple subset requirement becomes a homomorphism requirement in the other setting.
> 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.
And as I showed, it is irrelevant in the algebra setting.
> 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.
Which, is of course not what I did. *sigh* Is it really that hard to understand that I was talking about two different ways of looking at the same thing?
- Jan hidders
