Re: Dawn doesn't like 1NF

From: Marshall Spight <mspight_at_dnai.com>
Date: Sat, 16 Oct 2004 12:31:03 GMT
Message-ID: <aw8cd.268503$3l3.89210_at_attbi_s03>


"Laconic2" <laconic2_at_comcast.net> wrote in message news:qfSdnRkiTNZZmOzcRVn-2g_at_comcast.com...
>
> "Marshall Spight" <mspight_at_dnai.com> wrote in message
> news:hl0cd.188364$wV.92433_at_attbi_s54...
> > There are only two areas of complexity in equality: identity and
> > precision. Identity disappears completely if you don't allow pointers
> > in the language.
>
> Could you say a little more about this? I don't think I quite got your
> point.

[actually, based on your below anecdote, I'm pretty sure you did.]

> BTW, there was (is) this datatype in DEC Rdb/VMS called BLOBS (informally).
> The formal name was "segmented strings" or something like that. But they
> were strings of bytes, not strings of characters. I don't know whether or
> not that's what Dawn's referring to when she talks about strings.
>
> Segmented strings were stored one segment at a time, chained together by
> pointers. The value stored in the record that represents the table row was
> a pointer to the first variable. This is clearly non-relational, but it
> allowed you to store files inside the database, and subject them to the
> ACID of a DBMS.
>
> The test for equality in BLOBS was bizarre: if two values pointed at the
> same BLOB, then they were equal. If they pointed at different BLOBS, then
> they were unequal, even if the two BLOBS were equal, bit for bit! The
> builders of Rdb warned you: only use BLOBS if you know what you are doing!
>
> Is the bizarre test for equality in DEC Rdb/VMS BLOBS related to your point
> about identity and pointers?

Yes, exactly. This is what I mean by saying that most of our existing systems make this problem hard when the underlying problem is not actually hard. Here, (and in a thousand other systems that do essentially the same thing) the system designers just took a semantic short cut; they broken the othorgonality and clarity of the system in favor of cheap performance hack. There's a separate concept, "identity" that is often used in place of equality where an equality test would take a long time. Identity is a comparison of variables: are they the *same* variable? Equality is a comparison of values: are they the same value? Identity and equality are *not* the same operation, but many systems conflate the two, obscuring the difference. So many of us have had to work with this kind of thing for so long that we've come to believe that "equality is complicated" when it's actually quite simple.

If you don't expose pointers at the logical level, you don't have to have identity comparison in your system.

Marshall Received on Sat Oct 16 2004 - 14:31:03 CEST

Original text of this message