Re: Dawn doesn't like 1NF

From: Marshall Spight <mspight_at_dnai.com>
Date: Mon, 18 Oct 2004 15:32:03 GMT
Message-ID: <TlRcd.279812$3l3.55290_at_attbi_s03>


"Paul" <paul_at_test.com> wrote in message news:4173739e$0$59437$ed2619ec_at_ptn-nntp-reader03.plus.net...
> Marshall Spight wrote:
> > If lists truly should not be used as domain values in an RDBMS,
> > then we should not allow the domain "string", because the type
> > string is a list of characters; nothing more, nothing less.
> >
> > Since there are, in fact, no negative consequences of allowing
> > strings as a domain type, I conclude that there are no
> > negative consequences of allowing lists of arbitrary type.
>
> The important thing is that the internal workings of the type should be
> hidden from the relational engine. All it knows is that a value in a
> particular column is of a given type - it doesn't care or need to know
> if that value is an integer, a tuple, a relation, a database, a list or
> whatever. That's all outside its problem domain and should be handled by
> the type engine.

Let us propose that the relational engine is the servant of the type system. In that case, when the system sees a relation in the place of an attribute, why shouldn't it be able to use the relational operators on that attribute?

> The problem arises when people think you should be able to access the
> "inner" relation *directly* from the external database engine. e.g.
> something like:
>
> SELECT * FROM RELATION (SELECT foo FROM bar WHERE id = 123)
>
> (I'm inventing some syntax here - 'foo' is supposed to be a
> relation-valued attribute, and RELATION is some kind of operator that
> forces a value to be viewed as a relation in the DBMS - i.e. it turns
> data into metadata)
>
> This way lies madness!

So it keeps being asserted, but I'm not hearing any actual problems with this approach.

Going back to strings again, why *shouldn't* we be able to treat strings as relations of (int, char) and use the relational algebra on them.

Making up my own syntax:

That rules. It's quite powerful.

Now someone poke holes in it. But if all you want to do is assert that it's bad without justification, let's save us both the time.

Marshall Received on Mon Oct 18 2004 - 17:32:03 CEST

Original text of this message