Re: SQL (was: Why using "Group By")

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Fri, 14 Mar 2003 12:42:47 -0800
Message-ID: <Serca.9$k63.137_at_news.oracle.com>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:Rlqca.49$fF4.5348396_at_mantis.golden.net...
> Post-relational will not evolve from SQL. It would require sufficient
> theoretical advances in mathematics or logic to develop a new logical
model
> based on new theory.

Why dismissing a possibility that ad-hoc SQL development might provide some insights before theory catches on?

> Do you have an example problem requiring recursion for which transitive
> closure provides no solution?

Please express 5! via transitive closure. You are not allowed to represent multiplication as sum of logariphms (you wouldn't use transitive closure with that approach, anyway). My solution

select
  case when prior factorial is NULL then 1 else prior factorial*i end AS factorial
from integers
order by i

> (As an aside: Did you mean "then sal" where you have "then 0"?)

You may be right, but then

select sum(sal) from emp where 1=0

wouldn't return a row with 0. (Which it should no matter what SQL standard prescribes;-). I don't see how could I get around this problem, though. Received on Fri Mar 14 2003 - 21:42:47 CET

Original text of this message