Re: View vs. Statement Query Plan - Mailing list pgsql-general

From Curt Sampson
Subject Re: View vs. Statement Query Plan
Date
Msg-id Pine.NEB.4.43.0206051749150.454-100000@angelic.cynic.net
Whole thread Raw
In response to Re: View vs. Statement Query Plan  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: View vs. Statement Query Plan  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
On Wed, 5 Jun 2002, Martijn van Oosterhout wrote:

> One thing I don't know and that is how closely SQL follows relational
> algebra. Is it close enough that you can prove results in relational algebra
> and have them work in SQL. Or there enough special cases to make that
> tricky.

Ha! Nowhere near close enough. SQL actually breaks the relational model
in many ways; C. J. Date's books (particularly _The Third Manifesto_ and
his _Introduction to Database Systems_) go into this in detail.

I've not really had time to sit down and think about the characteristics
of the problem of whether or not a WHERE clause on a pair of SELECT
statements joined by UNION is distributitive or not. The easiest
thing would be if someone could find a case that proves by example
that the WHERE clause is not distributitive.

Providing a formal proof that it is distributive seems to me rather
difficult, because I can't even really see how to translate SQL
into relational algebra....

cjs
--
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC


pgsql-general by date:

Previous
From: Mark kirkwood
Date:
Subject: Re^3 : Solaris Performance - 64 bit puzzle
Next
From: Martijn van Oosterhout
Date:
Subject: Re: View vs. Statement Query Plan