ADQL/XML non compliance with SQL?
mchill at dial.pipex.com
Mon Feb 9 06:29:42 PST 2004
I'm pretty sure this is correct (standard) SQL:
SELECT * FROM table t WHERE t.i=t.z AND t.i=t.a AND t.b=t.e
I would expect that an SQL database will look at those ANDs and work out which
is the quickest set to solve first depending on internal indexing.
However ADQL/XML (and SADQL v1.0!) only allow pairwise ANDs. When transforming
ADQL/XML -> Database SQL, we must use brackets around each boolean construct,
because we don't know what the original priority might have been, ie:
WHERE (f OR f) AND (t OR t) = f
is different from
WHERE f OR (f AND t) OR t = t
and as soon as we use brackets we lose multiple Unions/Intersections.
We could work with the backend ADQL/XML->Database SQL transformations to fix
this, but I think it might be better if the schema represented the SQL
'properly'. Particularly as currently I expect it's the ADQL/SQL -> ADQL/XML
parser that is prioritising the brackets, rather than the backend.
So can I propose that IntersectionSearch and UnionSearch take 2..unbounded
On another point, isn't XOR a standard SQL boolean operator?
AstroGrid @ ROE
Tel: +44 7901 55 24 66
More information about the voql