ADQL/XML non compliance with SQL?
Tony Linde
ael at star.le.ac.uk
Mon Feb 9 10:26:06 PST 2004
Nearest BNF I could find included:
<search condition> ::=
<boolean term>
| <search condition> OR <boolean term>
<boolean term> ::=
<boolean factor>
| <boolean term> AND <boolean factor>
<boolean factor> ::=
[ NOT ] <boolean test>
<boolean test> ::=
<boolean primary> [ IS [ NOT ]
<truth value> ]
<boolean primary> ::=
<predicate>
| <left paren> <search condition> <right paren>
Which would indicate that we ought to have <LeftParen> and <RightParen>
elements in the language for explicit setting of precedence.
Cheers,
Tony.
> -----Original Message-----
> From: owner-voql at eso.org [mailto:owner-voql at eso.org] On
> Behalf Of Ray Plante
> Sent: 09 February 2004 18:13
> To: voql at ivoa.net
> Subject: Re: ADQL/XML non compliance with SQL?
>
>
> On Mon, 9 Feb 2004, Martin Hill wrote:
>
> > Hi Ray,
> >
> > As you put it yourself, should we be imposing these
> precedence rules?
>
> We should try to follow the SQL standard, whatever that is.
>
> > My
> > understanding of SQL in practice is that statements with
> many sequential ANDs
> > (or sequential ORs) are resolved at the database in the
> most efficent manner,
> > rather than blindly left to right. Clive Page probably
> knows more about this.
>
> I believe this is true. As I understand it, the DB may not
> strictly evaluate left to right for efficiency purposes;
> however, the final result must match according to the
> precedence rules.
>
> > If this is so, I guess this means the discussion has changed to
> > deciding
> > between
> > whether we 'stick rigorously to the SQL syntax' or
> 'interpret for practical
> > cases'.
>
> If we need predictable behavior across all DBs and the SQL
> standard does
> not provide that, then we may need to apply the latter.
>
> cheers,
> Ray
>
More information about the voql
mailing list