Re: MV Keys

From: JOG <jog_at_cs.nott.ac.uk>
Date: 1 Mar 2006 06:09:40 -0800
Message-ID: <1141222180.758766.226530_at_u72g2000cwu.googlegroups.com>


Brian Selzer wrote:
> "Jon Heggland" <heggland_at_idi.ntnu.no> wrote in message
> news:MPG.1e6fa30f17a25f9598976d_at_news.ntnu.no...
> > In article <3bla025sc4m8u59a7qoc09bipjtnh5tmuk_at_4ax.com>,
> > invalid_at_bigfoot.com says...
> >> I don't agree with this. Strings are (IMHO) scalar types because they
> >> can be sorted.
> >
> > Anything can be sorted. You just have to define an order. The order of
> > strings is essentially arbitrary, and you can sort lists of characters
> > the same way you sort strings.
> >
> >> However, mathematical operations on them, except for
> >> comparison operators, are not possible. But there are other
> >> operations, such as concatenation and substring, which are.
> >
> > What is a mathematical operation, and why are they important in this
> > context? Any list can support concatenation and "subbing"---what point
> > are you trying to make?
> >
> >> Also, the characters by themselves are meaningless much as the bits in
> >> a number by themselves are meaningless. It is the order of the bits,
> >> and the order of the characters, that give the number or string any
> >> meaning. Therefore, if you consider VARCHAR to be a compound type, you
> >> would have to say that DECIMAL is, too. And with real compound types
> >> such as lists or arrays, it is the elements themselves, and not the
> >> collection of elements, which gives the type semantic meaning.
> >
> > I'd say the meaning is primarily in the mind of the human using the
> > system. But I agree(?) that DECIMAL may indeed be considered compound. I
> > can use an int32 as an array of bits, each bit with a "meaning" in
> > itself---and I can likewise use a string as an array of characters. It
> > is just a matter of perspective, of mindset. The computer can't tell the
> > difference.
> >
> >> But I'm not a mathematician, so I couldn't say what it takes to prove
> >> whether something is a scalar type or not. Is there a formal
> >> definition?
> >
> > Exactly my question. I don't think there can be, but I may be wrong. :)
>
> Doesn't the determination of whether a type is scalar or not depend upon the
> universe of discourse? I think that a string is a scalar if any of the
> following statements hold: (1) individual character values don't belong to
> the universe of discourse, (2) the meaning of the individual character
> values aren't directly augmented by the attribute name, (3) the meaning of
> the individual character values aren't augmented by their position in the
> list, or (4) it is only the permutation of character values that has meaning
> with respect to the containing relation. For example, the elements in a
> list of birth dates aren't just dates, they're birth dates; the numbers in a
> coordinate aren't just numbers, they're longitude and lattitude. I think
> that some of those properties could be applied to other types as well,
> though I can't think of an example just now.
>
> > --
> > Jon

Some good points here. When we talk about scalars, we are not really talking about them in their mathematical sense (just look it up in a mathematical dictionary for evidence this). In actuality what one is talking about when one refers to scalars in this context are atomic values - a value that may not be broken/down into component parts.

But *nothing* is atomic. Ultimately everything may be defined compositionally, hence the debate about Varchars, strings, deciamls, etc. I honestly believe this is to be a fruitless argument.

In a finite system such as a database, at some point one simply HAS to stop decomposing, and the system is currently forced to proclaim when this should occur.

Hence 1-NF refers to decomposition down to atomic datatypes *as defined by the system*, whether that includes strings, dates, whatever.

I realise this definition sounds circular but that is the nature of something as artifice-laden as atomicity. Dig any further and again you will end up in the quagmire of epistemology, and there are no satisfactory or practical answers there. Received on Wed Mar 01 2006 - 15:09:40 CET

Original text of this message