1 from the seminar support for non-standard datatypes in dbms Held by Brendan Briody Accelerating XPath Location Steps.

Slides:



Advertisements
Similar presentations
Composing XSL Transformations with XML Publishing Views Chengkai LiUniversity of Illinois at Urbana-Champaign Philip Bohannon Lucent Technologies, Bell.
Advertisements

Chapter 10: Trees. Definition A tree is a connected undirected acyclic (with no cycle) simple graph A collection of trees is called forest.
Comp 122, Spring 2004 Binary Search Trees. btrees - 2 Comp 122, Spring 2004 Binary Trees  Recursive definition 1.An empty tree is a binary tree 2.A node.
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
Trees1 More on Trees University Fac. of Sci. & Eng. Bus. School Law School CS Dept. EE Dept. Math. Dept.
Managing Data Exchange: XPath
Binary Trees, Binary Search Trees CMPS 2133 Spring 2008.
1 CS 561 Presentation: Indexing and Querying XML Data for Regular Path Expressions A Paper by Quanzhong Li and Bongki Moon Presented by Ming Li.
QUANZHONG LI BONGKI MOON Indexing & Querying XML Data for../Regular Path Expressions/* SUNDAR SUPRIYA.
XPath. XPath Used to access part of XML document Used to access part of XML document Compact, non-XML syntax Compact, non-XML syntax Use a pattern expression.
XPath Eugenia Fernandez IUPUI. XML Path Language (XPath) a data model for representing an XML document as an abstract node tree a mechanism for addressing.
CS 171: Introduction to Computer Science II
Storing and Querying Ordered XML Using Relational Database System Swapna Dhayagude.
1 Indexing and Querying XML Data for Regular Path Expressions A Paper by Quanzhong Li and Bongki Moon Presented by Amnon Shochot.
Evaluation of MineSet 3.0 By Rajesh Rathinasabapathi S Peer Mohamed Raja Guided By Dr. Li Yang.
B + -Trees (Part 1). Motivation AVL tree with N nodes is an excellent data structure for searching, indexing, etc. –The Big-Oh analysis shows most operations.
Lecture 12. Default Processing in XSLT The default processing in XSLT is to process the XPath root node The default processing for various node types.
Inbal Yahav A Framework for Using Materialized XPath Views in XML Query Processing VLDB ‘04 DB Seminar, Spring 2005 By: Andrey Balmin Fatma Ozcan Kevin.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
1 Database Tuning Rasmus Pagh and S. Srinivasa Rao IT University of Copenhagen Spring 2007 February 8, 2007 Tree Indexes Lecture based on [RG, Chapter.
B + -Trees COMP171 Fall AVL Trees / Slide 2 Dictionary for Secondary storage * The AVL tree is an excellent dictionary structure when the entire.
Tirgul 6 B-Trees – Another kind of balanced trees.
CSC 2300 Data Structures & Algorithms February 6, 2007 Chapter 4. Trees.
CS4432: Database Systems II
C o n f i d e n t i a l HOME NEXT Subject Name: Data Structure Using C Unit Title: Trees.
Overview of XPath Author: Dan McCreary Date: October, 2008 Version: 0.2 with TEI Examples M D.
Introduction to XPath Bun Yue Professor, CS/CIS UHCL.
Chapter 61 Chapter 6 Index Structures for Files. Chapter 62 Indexes Indexes are additional auxiliary access structures with typically provide either faster.
10/06/041 XSLT: crash course or Programming Language Design Principle XSLT-intro.ppt 10, Jun, 2004.
Xpath Query Evaluation. Goal Evaluating an Xpath query against a given document – To find all matches We will also consider the use of types Complexity.
TDDD43 XML and RDF Slides based on slides by Lena Strömbäck and Fang Wei-Kleiner 1.
1/17 ITApplications XML Module Session 7: Introduction to XPath.
Introduction to XPath Web Engineering, SS 2007 Tomáš Pitner.
XSLT and XPath, by Dr. Khalil1 XSL, XSLT and XPath Dr. Awad Khalil Computer Science Department AUC.
Lecture 2 : Understanding the Document Object Model (DOM) UFCFR Advanced Topics in Web Development II 2014/15 SHAPE Hong Kong.
A Summary of XISS and Index Fabric Ho Wai Shing. Contents Definition of Terms XISS (Li and Moon, VLDB2001) Numbering Scheme Indices Stored Join Algorithms.
Lecture 10 Trees –Definiton of trees –Uses of trees –Operations on a tree.
Querying Structured Text in an XML Database By Xuemei Luo.
XPath Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Trees CSC 172 SPRING 2002 LECTURE 14. Lists We have seen lists: public class Node { Object data; Node next; } 
Processing of structured documents Spring 2003, Part 7 Helena Ahonen-Myka.
XPath. Why XPath? Common syntax, semantics for [XSLT] [XPointer][XSLT] [XPointer] Used to address parts of an XML document Provides basic facilities for.
Chapter 11 Indexing & Hashing. 2 n Sophisticated database access methods n Basic concerns: access/insertion/deletion time, space overhead n Indexing 
Binary Trees. Binary Tree Finite (possibly empty) collection of elements A nonempty binary tree has a root element The remaining elements (if any) are.
VLDB'02, Aug 20 Efficient Structural Joins on Indexed XML1 Efficient Structural Joins on Indexed XML Documents Shu-Yao Chien, Zografoula Vagena, Donghui.
12.1 Chapter 12: Indexing and Hashing Spring 2009 Sections , , Problems , 12.7, 12.8, 12.13, 12.15,
August Chapter 6 - XPath & XPointer Learning XML by Erik T. Ray Slides were developed by Jack Davis College of Information Science and Technology.
Tree Data Structures.
Data Structures and Algorithm Analysis Trees Lecturer: Jing Liu Homepage:
Starting at Binary Trees
WPI, MOHAMED ELTABAKH PROCESSING AND QUERYING XML 1.
1 XML Data Management XPath Principles Werner Nutt.
CSC 172 DATA STRUCTURES. LISTS We have seen lists: public class Node { Object data; Node next; } 
M180: Data Structures & Algorithms in Java Trees & Binary Trees Arab Open University 1.
Chapter 10: Trees A tree is a connected simple undirected graph with no simple circuits. Properties: There is a unique simple path between any 2 of its.
XPath --XML Path Language Motivation of XPath Data Model and Data Types Node Types Location Steps Functions XPath 2.0 Additional Functionality and its.
BINARY TREES Objectives Define trees as data structures Define the terms associated with trees Discuss tree traversal algorithms Discuss a binary.
TREES General trees Binary trees Binary search trees AVL trees Balanced and Threaded trees.
XML Native Query Processing Chun-shek Chan Mahesh Marathe Wednesday, February 12, 2003.
1 Storing and Maintaining Semistructured Data Efficiently in an Object- Relational Database Mo Yuanying and Ling Tok Wang.
1 The XPath Language. 2 XPath Expressions Flexible notation for navigating around trees A basic technology that is widely used uniqueness and scope in.
(c) University of Washington20-1 CSC 143 Java Trees.
1 Trees. 2 Trees Trees. Binary Trees Tree Traversal.
Tree Representation and Terminology Binary Trees Binary Search Trees Pointer-Based Representation of a Binary Tree Array-Based Representation of a Binary.
XML Query languages--XPath. Objectives Understand XPath, and be able to use XPath expressions to find fragments of an XML document Understand tree patterns,
Binary Trees "A tree may grow a thousand feet tall, but its leaves will return to its roots." -Chinese Proverb.
Section 8.1 Trees.
Data Structures and Database Applications Binary Trees in C#
CS223 Advanced Data Structures and Algorithms
CS210- Lecture 9 June 20, 2005 Announcements
Presentation transcript:

1 from the seminar support for non-standard datatypes in dbms Held by Brendan Briody Accelerating XPath Location Steps

2 Overview 1.Introduction - Awareness of tree structured data (XML...). - Problem with recursion and RDBMS. 2.Tree Traversals & Mappings (part 1) - Traversing trees to obtain information. - pre and post mapping to orthogonal coordinates, discovering their relationships and introducing corresponding XPath axes. 3.Axes and Query windows - Representing nodes in 5- dimensional descriptors and defining query windows for XPath axes. 4.Representation in SQL - Applying descriptors to a relational table and performing analogue SQL queries according to XPath expressions.

3 5. Shrink-Wrapping the // Axis Discovering equations to shrink-wrap window ranges to minimise query Query time comparison shrunk and non-shrunk windows. 6. Tree Mapping (part 2) Stretching - a different pre/post node assignment idea to avoid misled query scans of shrink-wrapping. Advantages / Drawbacks of shrinking and stretching. 7. Benchmarking Accel – Schema against Edge Mapping Performance tests in query time in dependency of document sizes and tree variations. Overview

4 1. Introduction Awareness of tree structured data in the everyday IT world and combination with RDBMS. How can we achieve this ? RDBMS Gain information independent of tree type ! >>

f g h b c d e a Pre Post 0 Traversal direction Tree traversals & Mappings (part 1)

6 Node pre post a07 b15 d20 e34 f41 g53 h62 c pre post a b c d e f g h 2. Tree traversals & Mappings (part 1)

7 bc de fg h a Context node pre post a b c d e f g h 3.1 XPath Major Axes

8 bc de fg h a e/descendant:: * pre post a b c d e f g h

9

10

11

12 4. Axes and Range Queries We have now successfully transformed recursive queries into range queries. To support all XPath Axes though we need a little more information. - child / parent, following / preceding siblings „par( v )“ value characterises these axes too - attribute is distinguished by a att(v) Boolean - tag( v ) holds the node or attribute name The result is a 5-Dim descriptor but giving us a 5- dimensional region: descr(v) = (pre(v),post(v),par(v),att(v),tag(v))

13 Axis α Query window( α,v ) prepostparatttag child <(pre( v ),  ) [), [0,post( v )), pre( v ), false,* > descendant <(pre( v ),  ) [), [0,post( v )), *, false,* > descendant-or-self <[pre( v ),  ) [], [0,post( v )], *, false,* > parent <[par( v ), par( v )] (), (post( v ),  ), *, false,* > ancestor <[0,pre( v )) (), (post( v ),  ), *, false,* > ancestor-or-self <[0,pre( v )] [), [post( v ),  ), *, false,* > following <(pre( v ),  ) (), (post( v ),  ), *, false,* > preceding <(0,pre( v )) (), (0,post( v )), *, false,* > following-sibling <(pre( v ),  ) (), (post( v ),  ), par(), false,* > preceding-sibling <(0,pre( v )) (), (0,post( v )), par(), false,* > attribute <(pre( v ),  ) [), [0,post( v )), pre( v ), true,* > Now instead of discrete pre/post values we define intervals [..), (..].. (..) Axes and Query windows

14 Specify SQL relational scheme with descriptor. 5-column Table accel Pre value can be considered as primary key Query(e / α ) = SELECT v’.* FROM Query(e) v, accel v’ WHERE v’ INSIDE window( α,v ) Idea of rectangular region query windows in pre /post plane. Optimised support by R- and B-Trees. To be continued.. 4. Representation in SQL prepostparatttag

15 4. Representation in SQL Creating conventional SQL Queries from XPath expressions: Ex.: /descendant::n1/preceding-sibling::n2 We get SELECT v2.* FROM accel v1, accel v2 WHERE 0 < v1.pre AND v1.tag = n1 AND v2.pre < v1.pre AND v2.post < v1.post AND v2.par = v1.par AND v2.tag = n2

16 5. Shrink wrapping the // axis Knowledge taken from specific properties of pre/post ranks to shrink window size(e) = level(e ) - pre(e) + post(e) (1) 3 = For the right most leaf of the sub tree we can say size(e) = pre(h) - pre(e) (2) 3 = f g h e Level 2 Level 3 Level 4

17 Using height(t) instead of level(e): Node h has max pre-order and node f has min post order rank pre(h) ≤ post(e) + height(t) post(f) ≥ pre(e) – height(t) The value height(t) of a document tree is assigned at document loading time. From equation (2) formed to pre(h) = pre(e) + size(e) and replacing size(e) with (1) leads to pre (h) = post(e) + level(e) For a useful estimation we can also for sure say that: Level(e) ≤ height(t) f g h e Level 2 Level 3 Level 4 5. Shrink wrapping the // axis

18 5. Shrink wrapping the // axis Attribute and leaf „l“ access Knowledge of pre(l) and post(l) differing by height: post = pre – height(t) We are left with a shrunk-wrapped region that minimizes query time considerably. With a B-tree based XPath accelerator on top of a IBM DB2 and an XML instance of 1.1 MB (21051 nodes) we get Queryt shrunk [s]t[s]# Nodes //open_auction//description //open_auction//description//listitem //open_auction//description//listitem//keyword

19 Independent pre/post scans result to possible results but also yield false hits. 6. Tree Mapping (part 2) False pre scan hits False post scan hits

20 6. Tree Mapping (part 2) Use a different type of pre post assignment to avoid false pre post scans f g h b c d e a Called stretching

21 6. Tree Mapping (part 2) a pre post b c d e g f h pre(e) post(e) pre(e)post(e) Ø ØØ Ø

22 6. Tree Mapping (part 2) Advantages and drawbacks of stretching: - avoids incorrect pre post scans by stretched mappings a seen in previous slide - all axis query windows work as before - pre and post of a context node are still unique - estimation of subtree size is accurate : size(v) = ½ (post(v) - pre(v) –1) - relationships are still maintained due to relationships and not absolute values. Drawback: The pre and post values are not dense.

23 7. Benchmarking Accel – Schema against Edge Mapping Measurements performed on: Intel i586 ~ 1 GHz CPU, 2.4 Linux Kernel, ext2 Filesystem, EIDE hard disk, 256 MB RAM No other processes active File size [MB]0,110,551, Edge map [s]0,170,71,520,498,8197 XPath Accel[s]0,030,250,342,422,944