Re: postgresql vs mysql

From: Tim Tassonis <timtas(at)cubic(dot)ch>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgresql vs mysql
Date: 2007-02-22 15:31:28
Message-ID: 45DDB750.7080303@cubic.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rich Shepard wrote:
> On Thu, 22 Feb 2007, Tim Tassonis wrote:
>
>> I do still think it is a bit of an oddity, the concept of the null
>> column.
>> From my experience, it creates more problems than it actually solves and
>> generally forces you to code more rather than less in order to achieve
>> your goals.
>
> Tim,
>
> Long ago, a lot of database applications used 99, or 999, or -1 to
> indicate an unknown value. However, those don't fit well with a textual
> field and they will certainly skew results if used in arithmetic
> calculations in numeric fields.

I remember, my first database to write stuff for was an IMB IMS
hierarchical/network one.

>
> The concept of NULL representing an unknown value, and therefore one that
> cannot be compared with any other value including other NULLs, is no
> different from the concept of zero which was not in mathematics for the
> longest time until some insightful Arab mathematician saw the need for a
> representation of 'nothing' in arithmetic and higher mathematics.
>
> There was probably resistance to that idea, too, as folks tried to wrap
> their minds around the idea that 'nothing' could be validly represented
> by a
> symbol and it was actually necessary to advance beyond what the Greeks and
> Romans -- and everyone else -- could do. Now, one would be thought a bit
> strange to question the validity of zero.

That's one point for me, then!. NULL exactly is _not_ the equivalent the
the number 0, but the mentioned strange symbol that has to be treated
specially and does not allow normal calculation, like '0' does in
mathematics. I don't know how many times I had to write a query that
ends with:

- or column is null
- and column is not null

exactly because it is a special symbol. In mathematics, the only special
case for zero that springs to my mind is the division of something by
zero (I'm by no means a mathematician).

As a completely irrelevant sidenote to the discussion, I'm greek and not
arabic, but I certinly do accept the superiority of the arabic notation.

>
> NULL solves as many intransigent problems with digital data storage and
> manipulation in databases as zero did in the realm of counting.

As I said, I don't deny it solves some problems (that could be solved in
a different way, too), but in my opinion, it creates more (that also can
be solved, as above examples show).

Tim

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joris Dobbelsteen 2007-02-22 15:43:34 Re: Guarenteeing ordering constraints
Previous Message Tom Lane 2007-02-22 15:31:16 Re: Infinite loop in transformExpr()