Documente Academic
Documente Profesional
Documente Cultură
Jeow Li Fook
jeowlifo@comp.nus.edu.sg
Constraint 5: Enumeration
<element name="age"><simpleType><restriction base="int"><minInclusive value="16"/><maxInclusive value="55"/></restriction></simpleType></element>
Semantic Transformations
We present 6 transformations of XPath expressions. These 6 transformations are later enabled by the knowledge of certain integrity constraints to transform an XPath expression into a semantically equivalent one, i.e. into an expression denoting the same set of XML data, for original XML data valid with respect to the given XML schema. Transformation 1: Expansion of path expression Transformation 2: Contraction of path expression Transformation 3: Addition of predicates Transformation 4: Removal of predicates Transformation 5: Return empty Transformation 6: Rewrite paths Constraint 1: Primary key
<key name="deptKey"><selector xpath="./department" /><field xpath="@id" /></key>
We have shown in the above 4 figures that transformations can lead to several outcomes in the 3 systems. These 3 systems have in some cases shown similar outcomes, and in other cases, differed in outcomes. Nevertheless, the results obtained can help us make better decision on what transformation to apply given a query. For example, if we want to transform path with wildcard selection, we knew from the performance evaluation that it is more beneficial to transform it to full path or partial path since there would be either reduction or no change in user response time.
Conclusion
We have identified transformations and classified them into 6 categories and have empirically shown that some of these transformations indeed result in an optimization of XPath queries. This preliminary work is encouraging and suggests a finer grain classification of the transformations. If a realistic cost model is available for the evaluation of XPath expressions, we can envisage to analytically evaluating the potential for optimization yielded by the different semantic transformations. We shall also explore applications other than optimization for the transformations that we have identified. We foresee applications in the distributed management and interchange of XML data in which query rewriting can result in increasing not only efficiency but also effectiveness.
Performance Evaluation
In total 37 queries and their corresponding transformed queries were evaluated. To get a clearer picture, we use T-test with a 95% confidence interval on the collected user response time for original query and for transformed query, to determine if there is-: (1) No change in response time, (2) Reduction in response time, (3) Increment in response time and (4) Non- deterministic result.
User Reponse Time
Query 8a 3000 2500 2000 1500 1000 500 0 System 1 System 2 Systems System 3 Query 8b
Reference
[1] King J. J. QUIST: a system for semantic query optimization in relational databases. In proceedings of the 7th VLDB conference, 1981. p. 510-517 [2] U. S. Chakravarthy, J. Grant, and J. Minker. Logic based approach to semantic query optimization. ACM Transactions on Database Systems Vol. 15, No. 2, June 1990. p. 162-207. [3] J. Grant, J. Gryz, J. Minker, L. Raschid. Logic based Semantic Query Optimization for Object Databases. Proceedings of the Thirteenth International Conference on Data Engineering, 1997. p. 444 - 453 [4] Jason McHugh, Jennifer Widom. Query optimization for XML. In proceedings of the 25th VLDB Conference, Edinburgh, Scotland, 1999. [5] Klemens Bohm and Karl Aberer and M. Tamer Ozsu and Kathrin Gayer. Query Optimization for Structured Documents Based on Knowledge on the Document Type Definition. Advances in Digital Libraries, 1998. p. 196-205 [6] D. Olteanu, H. Meuss, T. Furche, F. Bry. XPath: Looking Forward. In proceedings of the EDBT Workshop on XML Data Management. 2002 [7] A. Kwong and M. Gertz. Schema-based Optimization of XPath Expressions. Submitted for conference publication, 2002. <http://citeseer.nj.nec.com/551000.html>
Constraint 3: Exclusivity
<element name="city"><simpleType><restriction base="string"><enumeration value="Singapore" /><enumeration value="Malaysia" /></restriction></simpleType></element>
Time 3500 3000 2500 2000 1500 1000 500
Constraint 4: Cardinality
<element name="perm" type="permType" minOccurs="0" maxOccurs="20000"/>