Angela Bonifati, “Active XQuery”, ICDE 20021 Active XQuery A. Bonifati, D. Braga, A. Campi, S. Ceri Politecnico di Milano (Italy)

Slides:



Advertisements
Similar presentations
RDFTL: An Event-Condition- Action Language for RDF George Papamarkos Alexandra Poulovassilis Peter T. Wood School of Computer Science and Information Systems.
Advertisements

SeLeNe Kick-off Meeting 15-16/11/2002 SeLeNe-related Research At Birkbeck Alex Poulovassilis and Peter T.Wood Database and Web Technologies Group School.
Querying on the Web: XQuery, RDQL, SparQL Semantic Web - Spring 2006 Computer Engineering Department Sharif University of Technology.
Processing XML Keyword Search by Constructing Effective Structured Queries Jianxin Li, Chengfei Liu, Rui Zhou and Bo Ning Swinburne University of Technology,
SQL*PLUS, PLSQL and SQLLDR Ali Obaidi. SQL Advantages High level – Builds on relational algebra and calculus – Powerful operations – Enables automatic.
Advantage Data Dictionary. agenda Creating and Managing Data Dictionaries –Tables, Indexes, Fields, and Triggers –Defining Referential Integrity –Defining.
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
Paper by: A. Balmin, T. Eliaz, J. Hornibrook, L. Lim, G. M. Lohman, D. Simmen, M. Wang, C. Zhang Slides and Presentation By: Justin Weaver.
1 Rewriting Nested XML Queries Using Nested Views Nicola Onose joint work with Alin Deutsch, Yannis Papakonstantinou, Emiran Curtmola University of California,
Visual Web Information Extraction With Lixto Robert Baumgartner Sergio Flesca Georg Gottlob.
Survey of XML Query Languages Josh Spiegel. What is an XML Query Language? John Coltrane Maceo Parker Josh Spiegel I want all the employees.
2005rel-xml-ii1 The SilkRoute system  The system goals  Scenario, examples  View Forests  View forest and query composition  View forest efficient.
An Intelligent Broker Approach to Semantics-based Service Composition Yufeng Zhang National Lab. for Parallel and Distributed Processing Department of.
Sangam: A Transformation Modeling Framework Kajal T. Claypool (U Mass Lowell) and Elke A. Rundensteiner (WPI)
TECHNIQUES FOR OPTIMIZING THE QUERY PERFORMANCE OF DISTRIBUTED XML DATABASE - NAHID NEGAR.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
Knowledge Mediation in the WWW based on Labelled DAGs with Attached Constraints Jutta Eusterbrock WebTechnology GmbH.
An Information Theory based Modeling of DSMLs Zekai Demirezen 1, Barrett Bryant 1, Murat M. Tanik 2 1 Department of Computer and Information Sciences,
Integrating XML with Microsoft SQL Server ©NIITeXtensible Markup Language/Lesson 9/Slide 1 of 31 Objectives In this lesson, you will learn to: * Generate.
Cost-based Optimization of Graph Queries Silke Trißl Humboldt-Universität zu Berlin Knowledge Management in Bioinformatics IDAR 2007.
XML-to-Relational Schema Mapping Algorithm ODTDMap Speaker: Artem Chebotko* Wayne State University Joint work with Mustafa Atay,
Using XML in SQL Server 2005 NameTitleCompany. XML Overview Business Opportunity The majority of all data transmitted electronically between organizations.
Conceptual Modeling Issues in Web Applications enhanced with Web services Sara Comai, Politecnico di Milano In collaboration with:
1 Static Type Analysis of Path Expressions in XQuery Using Rho-Calculus Wang Zhen (Selina) Oct 26, 2006.
Database Solutions for Storing and Retrieving XML Documents.
Event-Condition-Action Rule Languages over Semistructured Data George Papamarkos.
Graph Data Management Lab, School of Computer Science gdm.fudan.edu.cn XMLSnippet: A Coding Assistant for XML Configuration Snippet.
DP&NM Lab. POSTECH, Korea - 1 -Interaction Translation Methods for XML/SNMP Gateway Interaction Translation Methods for XML/SNMP Gateway Using XML Technologies.
Peer-to-Peer Data Integration Using Distributed Bridges Neal Arthorne B. Eng. Computer Systems (2002) Supervisor: Babak Esfandiari April 12, 2005 Candidate.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
Cracow Grid Workshop, October 27 – 29, 2003 Institute of Computer Science AGH Design of Distributed Grid Workflow Composition System Marian Bubak, Tomasz.
EXist Indexing Using the right index for you data Date: 9/29/2008 Dan McCreary President Dan McCreary & Associates (952) M.
WWW10 Conference. May 1-5, Hong Kong1 Pushing Reactive Services to XML Repositories using ActiveRules Pushing Reactive Services to XML Repositories.
Future and Emerging Technologies (FET) Future and Emerging Technologies (FET) The roots of innovation Proactive initiative on: Global Computing (GC) Proactive.
Workshop on Software Product Archiving and Retrieving System Takeo KASUBUCHI Hiroshi IGAKI Hajimu IIDA Ken’ichi MATUMOTO Nara Institute of Science and.
BLAS: An Efficient XPath Processing System Zhimin Song Advanced Database System Professor: Dr. Mengchi Liu.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
24th of March 2005Deferred Incremental Refresh of XML Materialized Views1 COMPSCI 732 – Software Tools and Techniques Deferred Incremental Refresh of XML.
XML and Database.
Sept. 27, 2002 ISDB’02 Transforming XPath Queries for Bottom-Up Query Processing Yoshiharu Ishikawa Takaaki Nagai Hiroyuki Kitagawa University of Tsukuba.
Johannes Kepler University Linz Department of Business Informatics Data & Knowledge Engineering Altenberger Str. 69, 4040 Linz Austria/Europe
1 Typing XQuery WANG Zhen (Selina) Something about the Internship Group Name: PROTHEO, Inria, France Research: Rewriting and strategies, Constraints,
Scalable Hybrid Keyword Search on Distributed Database Jungkee Kim Florida State University Community Grids Laboratory, Indiana University Workshop on.
INRIA - Progress report DBGlobe meeting - Athens November 29 th, 2002.
Dec. 13, 2002 WISE2002 Processing XML View Queries Including User-defined Foreign Functions on Relational Databases Yoshiharu Ishikawa Jun Kawada Hiroyuki.
M.Kersten MonetDB, Cracking and recycling Martin Kersten CWI Amsterdam.
1 Approximate XML Query Answers Presenter: Hongyu Guo Authors: N. polyzotis, M. Garofalakis, Y. Ioannidis.
Session 1 Module 1: Introduction to Data Integrity
Commercial RDBMSs: Office Access and Oracle Pertemuan 13 Matakuliah: M0564 /Pengantar Sistem Basis Data Tahun : 2008.
Holistic Twig Joins Optimal XML Pattern Matching Nicolas Bruno Columbia University Nick Koudas Divesh Srivastava AT&T Labs-Research SIGMOD 2002.
A Publish & Subscribe Architecture for Distributed Metadata Management Markus Keidl 1 Alexander Kreutz 1 Alfons Kemper 1 Donald Kossmann 2 1 Universität.
1 Holistic Twig Joins: Optimal XML Pattern Matching Nicolas Bruno, Nick Koudas, Divesh Srivastava ACM SIGMOD 2002 Presented by Jun-Ki Min.
Chapter 9: Web Services and Databases Title: NiagaraCQ: A Scalable Continuous Query System for Internet Databases Authors: Jianjun Chen, David J. DeWitt,
OASIS ebXML Registry Standard Open Forum 2003 on Metadata Registries 10:30 – 11:15 January 20, 2003 Kathryn Breininger The Boeing Company Chair, OASIS.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Access Control Policy Languages in XML Lê Anh Vũ Võ Thành Vinh
SQL Triggers, Functions & Stored Procedures Programming Operations.
Defects of UML Yang Yichuan. For the Presentation Something you know Instead of lots of new stuff. Cases Instead of Concepts. Methodology instead of the.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Querying XML XQuery.
Chair of Tech Committee, BetterGrids.org
Querying XML XQuery.
Database management concepts
PL/SQL Programing : Triggers
Towards Automatic Model Synchronization from Model Transformation
Database management concepts
A Small and Fast IP Forwarding Table Using Hashing
Chapter 8 Advanced SQL.
Querying XML XSLT.
Database SQL.
Presentation transcript:

Angela Bonifati, “Active XQuery”, ICDE Active XQuery A. Bonifati, D. Braga, A. Campi, S. Ceri Politecnico di Milano (Italy)

Angela Bonifati, “Active XQuery”, ICDE Outline l Contributions l Background n An update language for XQuery [TI*01] l Syntax of Active XQuery l Semantics of Active Xquery l Bulk Expansion Algorithm and Trigger Execution Model l System Architecture l Conclusions and Open issues

Angela Bonifati, “Active XQuery”, ICDE Main Contributions An active extension of the W3C query language Emulation of SQL3 trigger definition An algorithm for update expansion and a mechanism for interleaved execution of triggers and updates An architecture for the rapid prototyping of Active XQuery

Angela Bonifati, “Active XQuery”, ICDE Example Document <!ATTLIST AuthorEntry uni CDATA #IMPLIED pubs IDREFS #IMPLIED>

Angela Bonifati, “Active XQuery”, ICDE Background An update language for Active Xquery presented by A. Y. Halevy et al. at Sigmod 2001 : FOR $target IN document("Lib.xml")/Library, $frag IN document("New.xml")/Shelves/Shelf WHERE UPDATE $target { INSERT $frag }

Angela Bonifati, “Active XQuery”, ICDE Fragment to Insert... J. Acute J. Obtuse Triangle Inequalities A. Sound Automated Reasoning...

Angela Bonifati, “Active XQuery”, ICDE The excerpt of Author Index... J. Acute A. Sound...

Angela Bonifati, “Active XQuery”, ICDE Referential Integrity NoDangling References:deletion of a `Book' element causes all its authors (listed in the index) to lose dangling references to that publication. CREATE TRIGGER NoDangle AFTER DELETE OF document("Lib.xml")//Book FOR EACH NODE DO ( FOR $AutIndex IN document("Lib.xml")//AuthorIndex, $MatchAut IN $AutIndex/AuthorEntry [Name = OLD_NODE/Author], $DangRef IN $MatchAut/ref(pubs, UPDATE $AutIndex { DELETE $DangRef } )

Angela Bonifati, “Active XQuery”, ICDE Syntax of XQuery Triggers CREATE TRIGGER Trigger-Name [WITH PRIORITY Signed-Integer-Number] (BEFORE|AFTER) (INSERT|DELETE|REPLACE|RENAME)+ OF XPathExpression (, XPathExpression)* [FOR EACH ( NODE|STATEMENT)] [XQuery-Let-Clause] [WHEN XQuery-Where-Clause] DO ( XQuery-UpdateOp | ExternalOp) NEWNODE(S) OLDNODE(S)

Angela Bonifati, “Active XQuery”, ICDE Semantics of Active XQuery Execution Model for Active XQuery – Semantics close to SQL3 (1) For each update, compute the set of affected nodes (2) Each update is located exactly between BEFORE and AFTER triggers (3) The procedure is recursively invoked if a trigger activates another trigger – SQL3 semantics does not work due to different granularity of updates – Need of an algorithmic expansion of bulk updates

Angela Bonifati, “Active XQuery”, ICDE Decomposition of updates in Active XQuery Each “bulk” update is transposed into a sequence of smaller granularity updates on which rules are fired out

Angela Bonifati, “Active XQuery”, ICDE An example of expansion(1) EvalBefore(s1) Name:s1 FOR $x IN document("Lib.xml")/Library, $frag IN UPDATE $x { INSERT } EvalBefore(s2) Name:s2 FOR $x IN document("Lib.xml")/Library, $frag IN $curfragment IN $x/*[empty($x/*[AFTER $curfragment])] UPDATE $curfragment { INSERT new_attribute(nr, "45") INSERT INSERT }

Angela Bonifati, “Active XQuery”, ICDE An example of expansion(2) EvalBefore(s3) Name:s3 FOR $x IN document("Lib.xml")/Library, $frag IN $curfragment IN $x/*[empty($x/*[AFTER $curfragment])], $cur_node IN $curfragment/*[1] UPDATE $cur_node { INSERT new_attribute(id, "AO97") INSERT J. Acute INSERT J. Obtuse INSERT Triangle Inequalities } EvalAfter(s3) EvalBefore(s4)

Angela Bonifati, “Active XQuery”, ICDE An example of expansion(3) Name:s4 FOR $x IN document("Lib.xml")/Library, $frag IN $curfragment IN $x/*[empty($x/*[AFTER $curfragment])], $cur_node IN $curfragment/*[2] UPDATE $cur_node { INSERT new_attribute(id, "So98") INSERT A. Sound INSERT Automated Reasoning } EvalAfter(s4) EvalAfter(s2) EvalAfter(s1)

Angela Bonifati, “Active XQuery”, ICDE Advantages/Drawbacks Advantages: – Quick matching of triggers with updates – Simple composition of triggers with updates (possibly recursive) – Trigger engine and query engine physically detached Drawbacks: – Intermediate states and order dependence – Repeated executions of path traversals (a possible solution: caching mechanisms)

Angela Bonifati, “Active XQuery”, ICDE Detailed description of Active XQuery execution model Call procedure EXPAND_STATEMENT and store the retrieved fragments RF and the sequence of micro-updates SIL FOR EACH item in SIL: – Call COMPUTE_BEFORE_CS if it is an “EvalBefore” instruction – Call COMPUTE_AFTER_CS if it is an “EvalAfter” instruction – Execute it if it is an update statement

Angela Bonifati, “Active XQuery”, ICDE Active XQuery Architecture

Angela Bonifati, “Active XQuery”, ICDE Open Issues Schema-driven optimizations Indexing optimizations Management of BEFORE triggers Definition of illegal executions Compile-time trigger behavior analysis

Angela Bonifati, “Active XQuery”, ICDE Conclusions We have developed an extension of W3C Xquery for trigger definition and management. We propose an highly scalable modular architecture in which the Xquery Optimizer can be plugged in. We hope our paper will contribute to discussion upon XQuery desired features.

Angela Bonifati, “Active XQuery”, ICDE Automatic Indexing Insertion of a `Book' element causes a new reference to be inserted in all index entries that represent new book's authors. CREATE TRIGGER AddNewReference WITH PRIORITY -10 AFTER INSERT OF document("Lib.xml")//Book FOR EACH NODE DO ( FOR $ai IN document("Lib.xml")//AuthorIndex, $a IN $ai/AuthorEntry[Name=$a] UPDATE $a { INSERT new_ref(pubs,

Angela Bonifati, “Active XQuery”, ICDE CREATE TRIGGER AddNewEntry AFTER INSERT OF document("Lib.xml")//Book FOR EACH NODE LET $AuthorsNotInList := ( FOR $n IN NEW_NODE/Author WHERE empty(//AuthorIndex/AuthorEntry[Name=$n]) RETURN $n ) WHEN ( not( empty($AuthorsNotInList )) ) DO ( FOR $ai IN document("Lib.xml")//AuthorIndex, $NewAuthor IN $AuthorsNotInList UPDATE $ai { INSERT {$NewAuthor/text()} 0 } )

Angela Bonifati, “Active XQuery”, ICDE CREATE TRIGGER IncrementCounter AFTER INSERT OF //new_ref(pubs) FOR EACH NODE LET $Counter := NEW_NODE/../PubsCount DO ( FOR $AuthorEntry IN NEW_NODE/.. UPDATE $AuthorEntry { REPLACE $Counter WITH $Counter + 1 } ) Counter of publications

Angela Bonifati, “Active XQuery”, ICDE More details in… My PhD Thesis (just defended): Angela Bonifati, “Reactive Services for XML Repositories”, PhD Thesis, Politecnico di Milano, January (…soon available on my HP)