Re: Dawn doesn't like 1NF

From: Paul <paul_at_test.com>
Date: Mon, 18 Oct 2004 08:41:18 +0100
Message-ID: <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.

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!

Paul. Received on Mon Oct 18 2004 - 09:41:18 CEST

Original text of this message