摘要 |
A mechanism is provided for generating Structured Query Language/Extensible Markup Language (SQL/XML) statements. An SQL/XML generation module receives an SQL statement that is expressed in terms of logical data items. The SQL/XML generation module parses and analyzes the SQL statement and generates a set of XMLQUERY functions, a set of XMLTABLE functions, and a set of XMLEXISTS predicates to retrieve, filter, or update at least one of XML documents or relational data based on a main mapping table and a namespace mapping table. The SQL/XML generation module generates at least one SQL/XML statement from parts of the SQL statement and the generated set of XMLQUERY functions, the set of XMLTABLE functions, and the set of XMLEXISTS predicates. The at least one SQL/XML statement is substantially equivalent in functionality to the SQL statement. The SQL/XML generation module sends the at least one SQL/XML statement to a database engine for execution.
|