Re: Dreaming About Redesigning SQL

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: "Seun Osewa" <seunosewa(at)inaira(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Dreaming About Redesigning SQL
Date: 2003-10-07 19:59:50
Message-ID: D90A5A6C612A39408103E6ECDD77B829408BE9@voyager.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Seun Osewa [mailto:seunosewa(at)inaira(dot)com]
> Sent: Friday, October 03, 2003 11:52 AM
> To: pgsql-hackers(at)postgresql(dot)org
> Subject: [HACKERS] Dreaming About Redesigning SQL
>
>
> Hi,
>
> This is for relational database theory experts on one hand
> and imlementers of real-world alications on the other hand.
> If there was a chance to start again and design SQL afresh,
> for best cleaness/power/performance what changes would you
> make? What would _your_ query language (and the underlying
> database concept) look like?
>
> Seun Osewa
> PS: I should want to post my ideas too for review but more
> experienced/qualified people should come first

I imagine you have read the 3rd database manifesto by Codd. I think
he's gone off the deep end a bit. You don't just throw away a trillion
dollars worth of effort and tools to make things mathematically
orthogonal.

However, on some things he is clearly right. For instance, null values
are evil. Programmers understand it, but end users will *always* be
surprised that:

SELECT COUNT(shirts) FROM clothing WHERE color = 'blue'
SELECT COUNT(shirts) FROM clothing WHERE NOT color = 'blue'

Is not equal to the number of shirts in the inventory if any color
fields are null.

Therefore, his idea of using default values instead and never using null
is a good one.

If SQL vendors would follow the ANSI/ISO standard to the letter, and
implement the latest iteration, that would solve all of the problems
that SQL tool users have to face.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Roderick A. Anderson 2003-10-07 21:39:26 Re: Learning PostgreSQL
Previous Message Patrick Welche 2003-10-07 19:48:04 Re: ecpg doesn't compile (datetime.h/dtime_t)