Xpath Query Processing for Relational Databases

Xpath Query Processing for Relational Databases

X2S XPath query processing for relational databases Diplomarbeit Am Institut für Programmstrukturen und Datenorganisation (IPD) Fakultät für Informatik der Universität Karlsruhe und FZI Forschungszentrum Informatik Tom Gelhausen Juli 2002 Verantwortlich: Prof. Dr. Peter C. Lockemann Betreuer: Aleksei Valikov Wassilios Kazakos Abstract This thesis shows a way to represent relational database content as a virtual XML document and how to process queries in natural XML access language (XPath) against this data. Design principals were both, efficiency and minimal sys- tem requirements to support also relational database systems without any type of build-in XML support. This is a read-only approach so far. The supported XPath features are • NodeTest: NameTest and NodeType • 8 axes (ancestor, ancestor-or-self, attribute, child, descendant, descendant-or-self, parent, self, unrolling is limited to mapping defini- tions depth) • relative navigation (starting from context node) • Constants: Numbers and Literals (Strings) • Operations: in principle all standard XPath 1.0 operations (additive (+, -), multiplicative (*, div, mod), and, or, equality (=, ≠), relational (>, ≥, <, ≤), union, sign) - 2 - Table of Contents ABSTRACT....................................................................................................................2 TABLE OF CONTENTS................................................................................................3 TABLE OF FIGURES ...................................................................................................5 TABLE OF ABBREVIATIONS .....................................................................................6 PREFACE ......................................................................................................................7 1 INTRODUCTION ............................................................................................9 1.1 MOTIVATION......................................................................................................................9 1.2 AN EXAMPLE ...................................................................................................................10 1.3 SCOPES ............................................................................................................................11 1.4 OVERVIEW .......................................................................................................................12 2 BASICS ..........................................................................................................13 2.1 RELATIONAL DATABASES ................................................................................................13 2.2 XML ................................................................................................................................14 2.3 XPATH .............................................................................................................................15 3 CONCEPTUAL CONSIDERATIONS ...........................................................17 3.1 PARADIGM GAPS ..............................................................................................................17 3.1.1 RECURSIVE STRUCTURE OF XML DOCUMENTS................................................................................................ 17 3.1.2 ORDER OF ELEMENTS IN AN XML DOCUMENT ................................................................................................. 18 3.1.3 NAVIGATION AND CONTEXT NODES ................................................................................................................. 19 3.2 CHOOSING THE MAPPING ................................................................................................19 3.3 RETURNED RESULTS .......................................................................................................21 3.4 CONSISTENCY..................................................................................................................22 4 STATE OF THE ART.....................................................................................25 4.1 MICROSOFT SQL SERVER 2000 XPATH QUERYING ........................................................25 4.1.1 RETRIEVING XML DATA VIA TRANSACT-SQL .................................................................................................. 25 4.1.2 RETRIEVING XML DATA VIA TEMPLATES......................................................................................................... 25 4.1.3 RETRIEVING XML DATA VIA XPATH................................................................................................................. 26 4.1.4 METHOD: THE EXPLICIT MODE..................................................................................................................... 27 4.1.5 DISTINCTIONS OF APPROACHES ....................................................................................................................... 29 4.2 IBM (XPERANTO/XTABLES) ......................................................................................30 4.3 JAIN/MAHAJAN/SUCIU (UNIVERSITY OF WASHINGTON) .................................................32 4.4 OTHER APPROACHES .......................................................................................................33 4.4.1 XREL................................................................................................................................................................. 33 4.4.2 XALAN (APACHE) .............................................................................................................................................. 34 4.4.3 ORACLE............................................................................................................................................................. 34 4.4.4 ROLEX ............................................................................................................................................................. 35 4.5 SUMMARY ........................................................................................................................35 5 DESIGN & REALIZATION ...........................................................................37 5.1 VIRTUAL DOM ................................................................................................................37 - 3 - 5.2 EXTENDED EXAMPLE.......................................................................................................40 5.3 THE BASIC OBJECT MODEL.............................................................................................42 5.4 DEMANDED TRANSLATION ..............................................................................................46 5.4.1 TRANSLATING ELEMENTS AND COLUMNS ........................................................................................................ 46 5.4.2 TRANSLATING CONDITIONS .............................................................................................................................. 46 5.4.3 TRANSLATING NESTED ELEMENTS................................................................................................................... 46 5.4.3.1 FIRST APPROACH .............................................................................................................................................. 47 5.4.3.2 CORRECTLY TRANSLATING NESTED ELEMENTS............................................................................................... 47 5.4.4 TRANSLATING EXISTENCE ................................................................................................................................48 5.4.5 TRANSLATING CROSS PRODUCTS...................................................................................................................... 49 5.5 THE SETUP ......................................................................................................................50 5.5.1 BASIC CONSIDERATIONS................................................................................................................................... 51 5.5.2 REQUIREMENTS ................................................................................................................................................ 51 5.5.3 ASYMMETRICAL (N:1) RELATIONS .................................................................................................................... 52 5.5.4 EXAMPLE .......................................................................................................................................................... 53 5.6 EXPRESSIONS ..................................................................................................................54 5.6.1 MATRIX OPERANDS........................................................................................................................................... 55 5.6.2 UNNESTING MATRIX OPERANDS ...................................................................................................................... 56 5.6.3 THE EXPRESSION OBJECT MODEL ................................................................................................................... 58 5.6.4 DOUBLE TREE ILLUSTRATION .......................................................................................................................... 60 5.7 THE PATH TRACING GRAPH (PTG)..................................................................................61 5.7.1 CLEAR POSITION WITHIN THE TEMPLATE DOCUMENT....................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    90 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us