Re: Proposal: 6NF

From: Keith H Duggar <duggar_at_alum.mit.edu>
Date: 14 Oct 2006 07:26:22 -0700
Message-ID: <1160835982.291277.58540_at_h48g2000cwc.googlegroups.com>


Bob Badour wrote:
> Jan Hidders wrote:
> > 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 RxR->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.
>
> I don't see that at all, Jan. The Integer inherits the
> division operation that returns a Real. It's just not part
> of the integer algebra. The integer type does indeed
> introduce additional operations, which is why many
> languages will distinguish between / and div for instance.

Unless I misunderstood one of you, I think you and Jan are saying the same thing. Jan said that we /can/ (though need not) "define a two-sorted algebra that combines the two algebras and their operations" for example:

REAL
  + : REAL REAL -> REAL
  / : REAL REAL -> REAL
  ...

INT
  + : INT INT -> INT
  div : INT INT -> INT
  ...

can be "combined" to give a two-sorted algebra for INT as

INT

  +   : INT INT -> INT
  div : INT INT -> INT
  \   : INT INT -> REAL

  ...

However we need not do this. Instead we could (as you said "[/]'s just not part of the integer algebra") leave the algebras as one-sorted and define an injective mapping INT -> REAL that preserves syntax and any constraints or other semantics/behavior we specified.

Keith -- Fraud 6 Received on Sat Oct 14 2006 - 16:26:22 CEST

Original text of this message