Re: Few confusing things about first normal form

From: JOG <jog_at_cs.nott.ac.uk>
Date: Sun, 26 Oct 2008 16:47:04 -0700 (PDT)
Message-ID: <e45504ab-a86e-4ec1-847a-28e50ac7e455_at_t42g2000hsg.googlegroups.com>


On Oct 24, 3:27 am, David BL <davi..._at_iinet.net.au> wrote:
> On Oct 23, 9:11 pm, paul c <toledobythe..._at_oohay.ac> wrote:
>
>
>
> > David BL wrote:
>
> > ...
>
> > > Is the value of an attribute that is an RVA a scalar?
>
> > I believe it is ie., in a "containing" tuple it's a (single) relation
> > value and (in the D&D approach) there is no way to operate on its
> > individual tuples.  Their algebra only operates on the value of the
> > relation.
>
> > (They have an operator called UNGROUP that forms a different relation
> > that has no RVA's.  Definition in thethirdmanifesto.com, see appendix A.
> > They don't the equality operator to treat the second relation as equal
> > to the first even though some of the possible values for the containing
> > /GROUPed relation might have exactly the same information as the
> > UNGROUPed one.  However, I don't believe they forbid an operator apart
> > from equality that decides some kind of equivalence.)
>
> > Hope somebody will correct me if I've mangled what D&D say.
>
> Isn't every type a scalar type?  Why not drop the word "scalar" as
> meaningless?   In fact it would seem a good idea to avoid the
> confusion with the rather specific meaning of "scalar" used in linear
> algebra (where it is associated with the field over which matrices and
> vectors are defined).

There is clash between the compsci use of the term, and the mathematical use. AFAIK Codd meant the former, a scalar meaning a variable that can only hold one value meeting the variable's type. One logical address - one item. This contrasts with an array, for example, which can contain more than one value, but does not require any form of decomposition to iterate through those values (i.e. it is not an object). One logical address - several items (lined up contiguosly)

While this once made sense in the low-level programming world, the uptake of OO (and specifically templates and containers) has severely confused these distinctions - an "Array" in pure OO languages /does/ require decomposition (through accessor methods), it is just that this is often hidden via overloading of an indexing syntax to mimic nonscalars  (i.e. square brackets). A <vector> for example is one item, at one logical address, that just happens to contain lots of others.

Hence, to a modern high level programmer, who probably wouldn't have any notion of contiguous memory addressing, all variables are scalars and for it to be otherwise would seem bizarre. Received on Mon Oct 27 2008 - 00:47:04 CET

Original text of this message