Re: MV Keys

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Wed, 1 Mar 2006 12:25:20 +0100
Message-ID: <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. :)

-- 
Jon
Received on Wed Mar 01 2006 - 12:25:20 CET

Original text of this message