Re: What databases have taught me
Date: 23 Jun 2006 18:06:50 -0700
Message-ID: <1151111209.977697.220740_at_i40g2000cwc.googlegroups.com>
Bob Badour wrote:
> Aloha Kakuikanu wrote:
>
> > Keith H Duggar wrote:
> >
> >>http://dbappbuilder.sourceforge.net/Rel.html
> >
> >
> > Speaking of clumsy syntax, why
> >
> > R WHERE x = 1 AND y = 2
> >
> > and not
> >
> > R AND x = 1 AND y = 2
> >
> > ?
>
> Would (R AND x = 1 AND y = 2) = (x = 1 AND y = 2 AND R) ?
Yes
> If so, wouldn't that make name resolution kinda complicated and perhaps
> error-prone?
I'm not clear what do you mean by name resolution. The expression
appeals from sql optimization perspective: it's a join of 3 finite
relations. There are 6 join order permutations possible:
i). x = 1 join y = 2 join R
ii). x = 1 join R join y = 2
iii). x = 2 join R join y = 1
iv). x = 2 join y = 1 join R
vi). R join y = 1 join x = 2
Evaluate cost of each and execute the one with lowest cost!
>From application programer perspective whenever I rewrite SQL by
copying/pasting and rearranging predicates the "WHERE" keyword is
always a source of bugs (those are admittedly minor problems easily
spotted, but still).
Received on Sat Jun 24 2006 - 03:06:50 CEST