The Planned Demise of SQL and the XQuery Connection
When XML came along and it quickly became apparent that SQL processors needed to support XML, many SQL processor designers and implementers saw this as an opportunity to finally move beyond SQL which they considered in its twilight years with an eye towards XQuery as its successor. The SQL/XML and XQuery standards at this initial stage were being designed by SQL processor designers and this new direction affected their design decisions that are limiting SQL’s and XQuery’s XML processing capabilities today. This was the design decision to also support relational processing in XQuery even though it was designed from the ground up to be an XML processor. Hierarchical processing and relational processing have two different sets of processing principles and simultaneous support for both of them weakens them both. This was a bad design decision because it severely limited XQuery’s hierarchical processing capability now and into the future.
An obvious side effect of this decision is that XQuery’s default join operator is the standard relational inner join which does not model hierarchical structures and in fact destroys hierarchical structures when joining to them. The inner join decision was to use this relational processing in XQuery as a natural bridge to transfer relational processing to XQuery. This allows XQuery to accommodate both relational and hierarchical processing, but the tradeoff is quite limiting. This made XQuery unable to enforce hierarchical processing and to support hierarchical structure–aware knowledge of the structure being operated on to support new hierarchical processing capabilities. This also means there is no enforcing of hierarchical processing, so results can be hierarchically inaccurate and go undetected. Another problem with XQuery is its user navigation which is too cumbersome to be used with the complexities of multipath processing.
With relational processing having replaced hierarchical processing over three decades ago, the relational designers today were not familiar with full hierarchical processing. They saw relational processing the same as linear hierarchical processing except it used navigation and where happy with this level of support for hierarchical data. Full nonlinear processing and its capabilities were not familiar to them. This short sidedness locked XQuery into linear processing severely limiting XML’s powerful data processing capabilities. Another problem is the SQL user’s love of their navigationless nonprocedural processing. XQuery’s navigational processing was and is a big stumbling block for them to accept XQuery which was not realized by Query designers who are very comfortable with navigation.
Ideally, SQL users want navigationless processes known today in XQuery academic research as schema-free processing. The fact that academic research is researching this new XQuery capability means that it is important to XQuery because it opens up full nonlinear multipath support. Schema-free processing means that the user does not have to be familiar with the data structure being processed. This automatically implies that multipath query support must be supported since the user may be specifyingdata items over multiple paths since they do not have know thedata structure. The XQuery current research on schema-free processing is to use functions on top of XQuery to perform this operation. Unfortunately this just adds to the complexity of coding the XQuery query and is also limited by the external limitations of this solution so that only simple multipath queries would be possible. This may also slow XQuery’s acceptance by SQL users. It now turns out that standard ANSI SQL can perform full nonlinear processing inherently. This means that SQL can be used directly to support fully transparent XML processing at a full nonlinear schema-free processing level with no hierarchical processing limitations of this full hierarchical support. This may yet save SQL from XQuery. Our online interactive ANSI SQL Transparent XML Nonlinear Hierarchal Processor demo below is proof of this.