First page Back Continue Last page Graphics
XQuery vs. SQL
XQuery is currently only for queries
- update capability to be added in the future
XQuery searches hierarchies
XQuery is case sensitive
Node order is significant in XQuery
XQuery can return nodes, not just values
Notes:
XQuery shares many similarities with SQL. Both are declarative languages and both are set oriented. In the case of SQL, the sets are made up of relational rows whereas in XQuery, it is made up of sequences. But there are many differences also.
SQL is very good to manipulate structured data but most information is not structured. XML can represent both structured and non-structured data.
Whereas relational rows do not have intrinsic ordering (unless explicitly requested with the order by clause), XQuery data always have an implicit ordering, the document order. Like SQL, this order can be changed with the use of the order by clause.