SQLfX To SQL/XML Comparison The SQL/XML Standard uses a series of XML centric functions placed in SQL’s SELECT list to output relational data as structured XML. The structure is specified by using nesting of the SQL SELECTs to conform to the data structure output. The requirements for control of the output XML are: knowledge of XML; the output data structure; and how to code the SQL to model the structure. This will require a programming professional with XML experience. The development of the output query is static and fixed. Changes to SQL/XML output can not be automated. The adding to or changing of the structure being modeled is not a simple process and the use of these SQL/XML functions eliminates the flexibility of SQL’s dynamic use of the SELECT list and its ease of use when invoking a query. There are also XML input functions which can take XML input and shred it into a rowset where it is treated as flat relational data. The ANSI SQL SQLfX was developed to support XML transparently so that no XML centric syntax or functions are necessary. In addition, it was designed to take maximum advantage of ANSI SQL’s inherent full nonlinear hierarchical processing as described in this chapter. The output XML structured format processing is performed automatically based on its hierarchical processing specified in the input SQL query. It is controlled naturally from the standard SQL which inherently defines the hierarchical structure which can be dynamically tailored by adding to or removing data references from the SELECT list. This automatic processing can support any multipath query which increases the value of the data and always produces the correctly formatted XML result and can support dynamic output formatting which can be used for On Demand Publishing for structured data reports. The SQL/XML standard does not support or enforce hierarchical processing but does allow its optimization to eliminate replicated data generated between the different hierarchical pathways when joined. A popular solution is to use the outer union to store the different pathways by performing their joins separately for each pathway. This works nicely for inputting XML and outputting the data formatted as XML, but does prevent the operation of the WHERE clause testing and filtering across the pathways. This means multipath queries are not supported, but the storage optimization can be considerable. SQLfX does support full nonlinear hierarchical processing and requires the standard relational hierarchical processing to perform the full Cartesian product and its introduction of data replications to be able to operate hierarchically correct. It also supports a powerful hierarchical dynamic optimization that does eliminate join operations that are not necessary to the query. This also eliminates unnecessary data and the replicated data it causes and does not prevent the inherent multipath processing. This optimization may also produce better CPU performance operation. But comparing memory and CPU performance between the prototype and the SQL/XML standard is not an equal comparison. SQLfX has many advantages and advancements over the SQL/XML standard mentioned above and in this paper that makes this efficiency comparison not straight forward.