Information Technology Reference
In-Depth Information
Fig. 6.11 Process for XQL to SQL transformation
Step 5 Transform XPath Query Data into SQL Query Data
The XML document returned from XMLDB is formatted into tables before the
document returned to user. The format of the result is based on the data stored in the
table table_column_seq (prepared in preprocessed schema translation).
Query Translation from XQL to SQL
To translate query from XQL to SQL, document tree nodes in XQL query are re-
placed by the relational JOIN in SQL. The XQL allows data retrieval using path ex-
pressions, and data manipulation using methods. A syntax-directed parser converts
the XQL into multiway trees. The transformation process is performed, based on the
subtree matching and replacement technique. The process of XQL query transfor-
mation is given in Fig. 6.11 .
Query Translation from XPath to SQL
XPath views a document as a tree of nodes consisting of elements and attributes.
Based on the generated XML schema, the XPath query graph of node navigation is
converted to SQL query graph of table joins. Below is a stepwise procedure of how
XPath query is translated to SQL query:
Search WWH ::




Custom Search