| Developing techniques for managing and querying the growing body of XML data is becomingly increasingly important. A popular approach to evaluating XML queries is to translate them to relational queries and then to use a relational database system to evaluate the result.; The XML and relational data models are significantly different, and as a result, the corresponding query languages (XQuery and SQL respectively) also differ significantly. This mismatch raises some interesting questions: (i) From a functionality perspective, is it possible to handle all XML data sets using this approach or are there any fundamental limitations in SQL that create problems? (ii) From a performance perspective, are there any implications on the quality of the SQL queries produced due to this mismatch between the two data models? In this thesis, we address the above two questions in two different scenarios: XML storage and XML publishing. In the former, the goal is to use relational databases to store and query existing XML data, while in the latter, existing relational data is exported as XML.; We demonstrate that it is possible to translate path expression queries (an important class of XML queries) into a single SQL query, even in the presence of recursion in the XML schema and the XML query. We then show that the SQL queries output by previously published algorithms often blindly reflect the hierarchical nature of the XML schema, even when it is clearly unnecessary. We present algorithms that avoid this problem by using additional semantic information intelligently. Since the form and nature of semantic information available differs for the XML storage and XML publishing scenarios, we need different mechanisms for achieving this goal in the two scenarios. Experiments with a commercial relational database system show that the SQL queries output by our algorithms can be far more efficient than the queries output by previous translation algorithms. |