Ecien t XML-to-SQL Query Translation: Where to Add the Intelligence?
Rajasekar Krishnamurthy, Raghav Kaushik, J.F. Naughton · 2004
We consider the eciency of queries generated by XML to SQL translation. We rst show that published XML-to-SQL query translation algorithms are suboptimal in that they often translate simple path expressions into complex SQL queries even when much simpler equivalent SQL queries exist. There are two logical ways to deal with this problem. One could generate suboptimal SQL queries using a fairly naive translation algorithm, and then attempt to optimize the resulting SQL; or one could use a more intelligent translation algorithm with the hopes of generating ecien t SQL directly. We show that optimizing the SQL after it is generated is problematic, becoming intractable even in simple scenarios; by contrast, designing a translation algorithm that exploits information readily available at translation time is a promising alternative. To support this claim, we present a translation algorithm that exploits translation time information to generate ecien t SQL for path expression queries over tree schemas.