Re: Examples of SQL anomalies?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Wed, 02 Jul 2008 18:28:12 -0300
Message-ID: <486bf2f1$0$4066$9a566e8b@news.aliant.net>


Marshall wrote:

> 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?

Given that it is wrong, I doubt there are any. A scalar value has to have a unique most specific type, but nothing prevents that MST being a subtype of another more general type.

>>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

Why? Oh why? Received on Wed Jul 02 2008 - 16:28:12 CDT

Original text of this message