![](bg6.png)
(1) Generation of the TPQ T
X1
(see Figure 7).
(2) Matching of the output node
PurchaseOrder* of T
X1
with the node
PurchaseOrder* of the PurchaseOrder_Type
template. The conditional expression
Customer/Address/City = "Baltimore" is translated
into a correspondent SQL clause, which is added
to the WHERE clause of the SQL/XML fragment
of PurchaseOrder* node.
(3) Matching of the output nodes Customer and
OrderDate with the nodes Customer and OrderDate
of PurchaseOrder_Type template, respectively.
(4) Matching of the output node LineItem* with
the node LineItem* of LinteItem_Type template. The
conditional expression Quantity > "20" is translated
into the correspondent SQL clause and added to
the WHERE clause of the fragment of LineItem*
node.
(5) The placeholder %content% in the
SQL/XML fragment of PurchaseOrder* node is
replaced by the SQL/XML fragments of
Customer, OrderDate and LineItem*.
(6) Finally, the nodes Product and Quantity of
T
X1
are matched with the nodes Product and
Quantity of LineItem_Type template, respectively.
The placeholder %content% in the SQL/XML
fragment of LineItem* node is replaced by the
SQL/XML fragments of Product and Quantity.
Figure 8 shows, in details, the SQL/XML
translation for the XQuery Q
X1
shown in Figure 6.
Figure 8 indicates the template and path used to
generate each subquery.
6 PERFORMANCE ANALYSIS
AND CONCLUSIONS
In this paper, we presented RelP, a framework for
publishing and querying relational databases through
XML views. We first showed how to specify a view
with the help of correspondence assertion. Next, we
presented an algorithm that translates XML queries
over a published XML view schema into a single
SQL/XML query over the data source schema.
We evaluate the performance of our algorithm
with respect to the query complexity and time
response. We compared our implementation with the
approach of using Oracle’s built-in XML view
mechanism. The results in Figure 10 show that our
approach can be significantly faster, if not, we have
similar performance (Lemos, 2010).
The main reason of this performance benefit
comes from our query templates, which are
generated at view creation time. It means that the
query translator component doesn’t have to deal
with the complexity of the view mappings at
execution time.
0
200
400
600
800
1000
1200
1400
1600
1800
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Time(ms)
XQuer
Queries
Oracle RelP
Figure 9: Response time vs. query.
REFERENCES
Benham, S E 2003, 'XML-Enabled Data Management
Product Architecture and Technology', XML Data
Management, Native XML and XML-Enable Database
Systems, Addison Wesley.
Bohannon, P et al 2004, 'Incremental evaluation of schema-
directed XML publishing', SIGMOD’04, pp. 503-514.
Eisenberg, A et al 2004, 'SQL:2003 has been published'
SIGMOD’04, pp. 119-126.
Fernández, M et al 2002, 'SilkRoute: A framework for Pu-
blishing relational data in XML', TODS’02, pp.438-493.
Funderburk, J E et al 2002, 'XTABLES: Bridging relational
technology and XML', IBM Systems Journal, vol.41, n. 4.
Haas, L M et al 2005, 'Clio Grows Up: From Research
Prototype to Industrial Tool', SIGMOD’05, pp. 805-810.
Jiang, H et al 2007, 'Mapping-driven XML Transformation',
WWW’07, pp. 1063-1072.
Krishnamurthy, R et al 2003, 'XML-to-SQL Query
Translation Literature: The State of the Art and Open
Problems', XSym’03, pp. 1-18.
Lemos, F C et al 2010, 'Using SQL/XML for Efficiently
Translating Queries over XML View of Relational
Data', Technical Report, http://lia.ufc.br/~arida
Liu, Z H et al 2005, 'Native XQuery Processing in Oracle
XMLDB', SIGMOD International Conference on
Management of Data, pp. 828-833.
Melnik, S et al 2005, 'Supporting Executable Mappings in
Model Management', SIGMOD’05, pp. 167–178.
Popa, L et al 2002, 'Translating Web Data', VLDB’02, pp.
598–609.
Vidal, V M P & Lemos, FC 2007, 'XVBA: A Tool for
Semi-Automatic Generation of SQL/XML Views', IV
Demo Session, SBBD’07, pp. 57-62.
Vidal, V M P et al 2006, 'Automatic Generation of
SQL/XML Views', SBBD’06, pp. 221–235.
Vidal, V M P et al 2004, 'XML Publisher: Um Framework
para Publicação de Dados Armazenados em Banco de
Dados Relacional ou Objeto Relacional como XML', 1st
Demo Session, SBBD’04, pp. 07-12.
ICEIS 2010 - 12th International Conference on Enterprise Information Systems
274