If however you have an XQuery capable database, then Piscator is not what you need. Today all leading relational databases support XQuery. There are also really good native XML databases out there like eXist (http://exist.sourceforge.net/).
Test 3 in the Piscator's unit test has the following SQL-query:
select xml, min_area from document d, property p, unit u
where d.doc_id = p.doc_id
and p.doc_id = u.doc_id
and 200 > min_area
and 200 < max_area
and postcode in (2000, 1000)
order by min_area
The XQuery version would look like this:
for $p in //Property
where $p/Job/Unit/Area[@Reference = "min"]/@Nominal < 200
and $p/Job/Unit/Area[@Reference = "max"]/@Nominal > 200
and ($p/Address/@Postcode = "2000" or $p/Address/@Postcode = "1000")
order by $p/Job/Unit/Area[@Reference = "min"]/@Nominal
Plain SQL is READABLE; XQuery IS NOT. See the same difference as - say - between APL Code and Java. I think that's the reason for Piscator. Problem is rather the instability of the recent version.
Log in to post a comment.