Re: Examples of SQL anomalies?

From: Marshall <marshall.spight_at_gmail.com>
Date: Wed, 2 Jul 2008 14:10:29 -0700 (PDT)
Message-ID: <fd476a74-594c-489a-8308-069b654b30c7_at_j1g2000prb.googlegroups.com>


On Jul 2, 1:39 pm, -CELKO- <jcelko..._at_earthlink.net> wrote:
> >> Splitting the question up into different question (1) is the best approach here. If SQL had union types, we could do that. <<
>
> Okay,I have a union type column which alternately holds integer,
> float, strong and temporal data in each row.

Already it's apparent that you don't know what union types are and so anything you say about them will be invalid.

"Go to school, Joel. Learn something."

http://en.wikipedia.org/wiki/Tagged_union

> RDBMS and SQL are *very* strongly typed as part of First Normal Form.

The term "strongly typed" is no longer current. Have you read up on type theory at all? Perhaps you are trying to say something like "statically typed." Of course, whatever you meant to say, your point about 1NF is entirely incorrect. There is no mathematical reason to put any restriction on what can go in a set, or in a relation. And for Codd's idea of 1NF, it is only necessary to be able to distinguish whether a value is a relation or not, and to disallow relations as values in a tuple.

> A scalar value has to have one and only one data type.

There are some decent type-theoretic reasons for this. Do you know what they are, I wonder?

> That is why Codd put NULLs into his type model.

Codd put NULL in his model because he didn't know any better. Type theory has come a long way since 1970. We now understand why 3VL is a bad idea, and we now understand more general, more typesafe ways to accomplish the few things it can do.

Marshall Received on Wed Jul 02 2008 - 23:10:29 CEST

Original text of this message