1 Ling Wang Advisor: Elke A. Rundensteiner Co-Advisor: Kathi Fisler Updating XQuery Views Published over Relational Data.

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

CHAPTER OBJECTIVE: NORMALIZATION THE SNOWFLAKE SCHEMA.
Chapter 10: Designing Databases
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
XML May 3 rd, XQuery Based on Quilt (which is based on XML-QL) Check out the W3C web site for the latest. XML Query data model –Ordered !
TIMBER A Native XML Database Xiali He The Overview of the TIMBER System in University of Michigan.
Ling Wang, Mukesh Mulchandani Advisor: Elke A. Rundensteiner Co-Advisor: Kathi Fisler Updating XML Views over Relational Data.
Relational Databases for Querying XML Documents: Limitations & Opportunities VLDB`99 Shanmugasundaram, J., Tufte, K., He, G., Zhang, C., DeWitt, D., Naughton,
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 28 Database Systems I The Relational Data Model.
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.
Agenda from now on Done: SQL, views, transactions, conceptual modeling, E/R, relational algebra. Starting: XML To do: the database engine: –Storage –Query.
NaLIX: A Generic Natural Language Search Environment for XML Data Presented by: Erik Mathisen 02/12/2008.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Basic (Flat) Relational Model.
Web-site Management System Strudel Presented by: LAKHLIFI Houda Instructor: Dr. Haddouti.
11/08/2002WIDM20021 An Algebraic Approach For Incremental Maintenance of Materialized XQuery Views Maged EL-Sayed, Ling Wang, Luping Ding, and Elke A.
Ling Wang, Mukesh Mulchandani Advisor: Elke A. Rundensteiner Rainbow Research group, DSRG, WPI Updating XQuery Views over Relational Data.
A Graphical Environment to Query XML Data with XQuery
1 Efficient XML Stream Processing with Automata and Query Algebra A Master Thesis Presentation Student: Advisor: Reader: Jinhui Jian Prof. Elke A. Rundensteiner.
1 COS 425: Database and Information Management Systems XML and information exchange.
1 Lecture 13: Database Heterogeneity Debriefing Project Phase 2.
The Relational Model Lecture 3 Book Chapter 3 Relational Data Model Relational Query Language (DDL + DML) Integrity Constraints (IC) From ER to Relational.
April 4, 2002 Updating XML Views of Relational Data 1 Master’s Thesis Update Talk For Mukesh Mulchandani Advisor : Prof. Elke Rundensteiner Reader : Prof.
WIDM 2002 DSRG, Worcester Polytechnic Institute1 Honey, I Shrunk the XQuery! —— An XML Algebra Optimization Approach Xin Zhang, Bradford Pielech and Elke.
Page 1 Multidatabase Querying by Context Ramon Lawrence, Ken Barker Multidatabase Querying by Context.
Database Systems More SQL Database Design -- More SQL1.
Sangam: A Transformation Modeling Framework Kajal T. Claypool (U Mass Lowell) and Elke A. Rundensteiner (WPI)
CIS607, Fall 2005 Semantic Information Integration Article Name: Clio Grows Up: From Research Prototype to Industrial Tool Name: DH(Dong Hwi) kwak Date:
LOGICAL DATABASE DESIGN
CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E) 1.
Midterm 1 Concepts Relational Algebra (DB4) SQL Querying and updating (DB5) Constraints and Triggers (DB11) Unified Modeling Language (DB9) Relational.
4/20/2017.
XML, distributed databases, and OLAP/warehousing The semantic web and a lot more.
XML-to-Relational Schema Mapping Algorithm ODTDMap Speaker: Artem Chebotko* Wayne State University Joint work with Mustafa Atay,
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
Chapter 4 The Relational Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Relational Data Model and Relational Database Constraints.
CSE314 Database Systems More SQL: Complex Queries, Triggers, Views, and Schema Modification Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
The main mathematical concepts that are used in this research are presented in this section. Definition 1: XML tree is composed of many subtrees of different.
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.
Querying Structured Text in an XML Database By Xuemei Luo.
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
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.
7 1 Constraints & Triggers Chapter Constraints and triggers? Constraints: Certain properties that the DBMS is required to enforce –E.g. primary.
The Semistructured-Data Model Programming Languages for XML Spring 2011 Instructor: Hassan Khosravi.
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
XML and Database.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Dec. 13, 2002 WISE2002 Processing XML View Queries Including User-defined Foreign Functions on Relational Databases Yoshiharu Ishikawa Jun Kawada Hiroyuki.
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
XML May 6th, Instructor AnHai Doan Brief bio –high school in Vietnam & undergrad in Hungary –M.S. at Wisconsin –Ph.D. at Washington under Alon &
IS432 Semi-Structured Data Lecture 6: XQuery Dr. Gamal Al-Shorbagy.
Session 1 Module 1: Introduction to Data Integrity
Holistic Twig Joins Optimal XML Pattern Matching Nicolas Bruno Columbia University Nick Koudas Divesh Srivastava AT&T Labs-Research SIGMOD 2002.
1 Holistic Twig Joins: Optimal XML Pattern Matching Nicolas Bruno, Nick Koudas, Divesh Srivastava ACM SIGMOD 2002 Presented by Jun-Ki Min.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
1 Storing and Maintaining Semistructured Data Efficiently in an Object- Relational Database Mo Yuanying and Ling Tok Wang.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
SEMI-STRUCTURED DATA (XML) 1. SEMI-STRUCTURED DATA ER, Relational, ODL data models are all based on schema Structure of data is rigid and known is advance.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
OrientX: an Integrated, Schema-Based Native XML Database System
The Relational Model Relational Data Model
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Semi-Structured data (XML Data MODEL)
Semi-Structured data (XML)
Presentation transcript:

1 Ling Wang Advisor: Elke A. Rundensteiner Co-Advisor: Kathi Fisler Updating XQuery Views Published over Relational Data

2 Outline Motivation Related Work Background: XML, XML Views, XQuery Update Extension Problem Definition: - Characterize the XML View Update Problem (XVUP) - Correct Translatability - Classify subproblems: RUP, PUP Update Strategy for PUP Rainfall System Experimental Study Contributions Conclusion

3 XML is a standard for exchanging data between web applications But RDBMS is mature data management technology: - Reliable persistent storage technique - Mature query optimization technique XML Management Systems using Relational technology - SilkRoute (AT&T), XPERANTO (IBM), RAINBOW (WPI) - Features: # provide reliable persistent storage # support XML view mechanism for XML data publishing # support queries over XML views Systems must support update to become viable system Motivation

4 View update problem in Relational databases is hard - What is a correct translation? - How to eliminate ambiguity in translation? XML view update offers new challenges - Mappings: Data model mapping: XML vs. Relational Query language mapping: XQuery vs. SQL - Consistency : Constraints in different schemas such as XML schema, Relational schema, XML view schema XML View Update RDBMS View Query XML View XQuery update SQL Update RDBMS Default View eg: Schema reducing (IDREF), Schema increasing (Duplicate)

5 Related Work 1.Umeshwar Dayal, Philip A. Bernstein, On the Updatability of Relational Views, IEEE First work, describe criteria of correct update translation. 2.F Bancilhon and N. Spyratos, Update Semantics of Relational Views, ACM Transactions on Database Systems, 1984 Complementary theory to eliminate ambiguous in update translation. 3.A. M. Keller, Barsalou, Siambela and Wiederhold, Updating Relational Databases through Object-Based Views, SIGMOD 1991 View update problem in Object-base views. 4.Tatarinov Ives, Alon Halevy and Daniel Weld, Updating XML, SIGMOD 2001 XQuery update extension, XML view update performance

6 Where we are Motivation Related Work Background: XML Views, XQuery Update Extension Problem Definition: - Characterize the XML View Update Problem (XVUP) - Correct Translatability - Classify subproblems: RUP, PUP Update Strategy for PUP Rainfall System Experimental Study Contributions Conclusion

7 XML Schema ……

8 XML document Bib.xml Addison-Wesley Boston A clear and detailed discussion of UNIX programming Data on the Web Serge Abiteboul Peter Buneman Dan Suciu Morgan Kaufmann Publishers New York A very good discussion of semi-structured database systems and XML TCP/IP Illustrated W. Stevens Addison-Wesley San Francisco One of the best books on TCP/IP Programming in Unix Bram Stoker

9 Example Database ( Inlining) IIDPIDaname W.Stevens Bram Stoker Serge Abiteboul Peter Buneman Dan Suciu IIDPIDbookidtitleauthor_IIDyear TCP/IP Illustrated Programming in Unix Data on the Web author book IIDpnamelocation 1.0 Addison-Wesley San Francisco 2.0Addison-WesleyBoston 3.0Morgan Kaufman publishers New York publisher IIDPIDreview 1.0 One of the best books on TCP/IP. 2.0 A clear and detailed discussion of UNIX programming. 3.0 A very good discussion of semi- structured database systems and XML. review Legend: Primary Key Unique Key Non Key RDBMS View Query XML View XQuery update SQL Update RDBMS Default View

10 Default View TCP/IP Illustrated W. Stevens Addison-Wesley SanFrancisco One of the best books on TCP/IP Bridging the gap between Relational database and XML data models - Show database structure, 1:1 mapping RDBMS View Query XML View XQuery update SQL Update RDBMS Default View

11 XML View FOR $book in document("default.xml")/book/row RETURN{ $book/title/text(), FOR $aname in document("default.xml")/author/row WHERE $book/author_IID = $aname/PID RETURN{ $aname/aname/text() } } - Information hiding - User specific data wrapping TCP/IP Illustrated W. Stevens Programming in Unix Bram Stoker Data on the Web Serge Abiteboul Peter Buneman Dan Suciu View Query Virtual XML View RDBMS View Query XML View XQuery update SQL Update RDBMS Default View

12 XQuery Update Grammar FOR $binding1 IN Xpath-expr,….. LET $binding := Xpath-expr,… WHERE predicate1,….. updateOp,…… Where updateOp is defined as : UPDATE $binding {subOp {, subOp}* } and subOp is : DELETE $child | INSERT ( $bind [BEFORE | AFTER $child] | new_attribute(name, value) | new_ref(name, value) | content [BEFORE | AFTER $child] ) | REPLACE $child WITH ( new_attribute(name, value) | new_ref(name, value) | content ) | FOR $sub_binding IN Xpath-subexpr,….. WHERE predicate1,………. updateOp. - XQuery does not support update operations - Update extension for XQuery language proposed in [SIGMOD2001] - FLWU Expression RDBMS View Query XML View XQuery update SQL Update RDBMS Default View

13 FOR $book IN document(“bib.xml")/book LET$author:=$book/author WHERE $book/title = “TCP/IP Illustrated” UPDATE $author{ INSERT "Peter Naughton " } Insert update Update XQuery example Updated view TCP/IP Illustrated W. Stevens "Peter Naughton " Programming in Unix Bram Stoker Data on the Web Serge Abiteboul Peter Buneman Dan Suciu RDBMS View Query XML View XQuery update SQL Update RDBMS Default View

14 Where we are Motivation Related Work Background: XML Views, XQuery Update Extension Problem Definition: - Characterize the XML View Update Problem (XVUP) - Correct Translatability - Classify subproblems: RUP, PUP Update Strategy for PUP Rainfall System Experimental Study Contributions Conclusion

15 General Characterization of XVUP Information Modification Instance Language View Query RDB Content RDB Schema Integrity Constraints (Key, FK) Local Constraints (Not Null, domain) BCNF / 3NF / 2NF Acyclic Dependency / Cyclic Dependency Duplicates ( Aggregation ) ( Recursion ) Hierarchy Consistency Key Exposition Non Correlation predicates attribute exposition Correlation predicates attributes exposition Nested queries Deletion Insertion Replacement Rename Order Set of each Group Update ( Schema Change ) Assumption Exploring space

16 Schema Mapping in XVUP Constraints in Extracted XML View Schema Cardinality Hierarchy from view query Duplication Constraints in XML Schema/DTD Domain of element/attributes Key Constraints Referential Integrity Constraints (Foreign Key) Optional element Nillable attributes Cardinality constrains Hierarchy Choice Inclusion dependency (ID/IDREF) Sequence Constraints in Relational Database schema Domain Constraints of attribute in relation Primary key / unique key of table Foreign key between tables Attributes is Null / Not null Table definition Global Constraints Constraints in Filtered XML View Schema Domain Cardinality Null/Not null Hierarchy ? ? XML View Schema ESchemaFSchema Loading View Query Problem Definition: - Characterize the XVUP - Schema mapping in XVUP - Classify subproblems: RUP, PUP - Update operation - Correct translatability

17 Example of FSchema vs. ESchema FOR $book in document("default.xml")/book/row RETURN{ $book/bookid/text(), $book/title/text(), FOR $aname in document("default.xml")/author/row WHERE $book/author_IID = $aname/PID RETURN{ $aname/aname/text() } } IIDPIDaname W.Stevens IIDPIDbookidtitleauthor_IIDyear TCP/IP Illustrated author book Fschema: bookid (Not Null) title (Varchar(256)) Eschema: Hierarchy: book = parent(bookid) Cardinality: (book:aname) = (1:n) Relational database View Query

18 Partition for XVUP Problem Space Publishing-based Update Problem (PUP) - General problem ---- updating freely constructed XQuery view. - Touching all features in Language dimension. Round-trip Update Problem (RUP) - Simplest special problem. - View has same schema as original XML document - No abnormal case exists. RDBMS View Query XML View RDBMS XML Doc+Schema 1 2 RUP PUP Problem Definition: - Characterize the XVUP - Schema mapping in XVUP - Classify subproblems: RUP, PUP - Update operation - Correct translatability

19 XML View Update Operation Complete vs. Partial update - Complete ---- insert/delete/replace a fully specified view-element instance - Partial ---- insert/delete/replace a component of view-element instance Valid vs. Invalid update - Valid ---- Never against any constraints in ESchema, Fschema (domain+null). Update translation. - Invalid ---- Against Constraints. Rejected TCP/IP Illustrated W. Stevens Programming in Unix Bram Stoker Data on the Web Serge Abiteboul Peter Buneman Dan Suciu Complete Partial Problem Definition: - Characterize the XVUP - Schema mapping in XVUP - Classify subproblems: RUP, PUP - Update operation - Correct translatability

20 Correct Update Translatability No side effect Only desired update is performed on view. One step changes - Each database tuple affected by at most one step of update operation - Implications: No order between update operations Could affect same table several times Minimal changes - No valid translation is subset of current translation - No extraneous updates Replacement cannot be simplified - Two replaces could get same result, pick simple one - Replace minimum attribute set / non-key replacement No insert-delete pairs - Replace is cheaper than Insert/Delete pair Problem Definition: - Characterize the XVUP - Schema mapping in XVUP - Classify subproblems: RUP, PUP - Update operation - Correct translatability

21 Where we are Motivation Related Work Background Problem Definition Update Strategy for PUP Exposition completeness Construction consistency Duplicate View updatability in PUP Rainfall System Experiment Study Contributions Conclusion

22 Problem for PUP Information Modification Instance Language Duplicates ( Aggregation ) ( Recursion ) Hierarchy Consistency Key Exposition Non Correlation predicates attribute exposition Correlation predicates attributes exposition Nested queries Assumption Exploring space Exposition feature Update Strategy for PUP Exposition completeness Construction consistency Duplicate View updatability in PUP

23 Exposition Completeness Key Exposition - Primary key of underlying relation has to be exposed - except automatic generated key (implication: user has right to update it) Non Correlation predicates attribute exposition (select condition) - variable involved in predicates has to be exposed eg: $book/bookid = “98004” bookid has to be exposed in view result Correlation predicates attribute exposition (join condition) - variable involved in predicates has to be exposed eg: $book/authorid = $author/id then authorid in book table, id in author table have to be exposed Complete Exposition Update Strategy for PUP Exposition completeness Construction consistency Duplicate View updatability in PUP

24 Construction Consistency IIDPIDbookidtitleauthor_IIDyear TCP/IP Illustrated Advanced Programming in the Unix environment Data on the Web book IIDpnamelocation 1.0 Addison-Wesley San Francisco 2.0Addison-WesleyBoston 3.0Morgan Kaufman publishers New York publisher Reason: freely construct the view query Confliction between FSchema and ESchema View structure could be inconsistent with RDB, causing side-effect in update translation. Update Strategy for PUP Exposition completeness Construction consistency Duplicate View updatability in PUP

25 FOR $book IN document("default.xml")/book/row, $publisher IN document("default.xml")/publisher/row WHERE $book/author_IID = $publisher/IID RETURN $book/bookid, $book/title, $publisher/pname TCP/IP Illustrated Addison-Wesley …… Construction Consistency FOR $book IN document("default.xml")/book/row, $publlisher IN document("default.xml")/publisher/row WHERE $book/IID = $publisher/IID RETURN $publisher/pname, $book/bookid, $book/title Addison-Wesley TCP/IP Illustrated …… View Query Example Consistent View Query Example Inconsistent Delete Side Effect Update Strategy for PUP Exposition completeness Construction consistency Duplicate View updatability in PUP

26 How to find inconsistent construction? Implicit hierarchy in Relational context: - Table vs. Attribute - Key vs. Foreign-Key bookidtitleyearpnamelocationreview BOOK bookidauthoridname AUTHOR Then, book is parent of all its attributes, book is parent of author Hierarchy in View context - Return clause in FLWR expression - Variable binding in FOR clause View Schema Graph (VSG) to describe hierarchy in FSchema Update Strategy for PUP Exposition completeness Construction consistency Duplicate View updatability in PUP View Relationship Graph (VRG) to describe hierarchy in ESchema

27 bib Publisher_info book book/row/bookid book/row/title publisher/row/pname book book/row/bookidbook/row/titlepublisher Publisher/row/pname Hierarchy in relational context: View Relationship Graph Hierarchy in view context: View Schema Graph Reducing Operator: - Rename - Add - Delete bib book book/row/bookid book/row/title Publisher_info Publisher/row/pname Rename

28 Duplicate - Two vertexes in VSG are exposed from same relational attribute. - Partial updates touching duplicate elements are not translatable. why? Cause ambiguous/inconsistent effect on underlying relation. book publisher author book/row/title update book/row/title author/row/aname publisher/row/pname Update Strategy for PUP Exposition completeness Construction consistency Duplicate View updatability in PUP

29 View FeaturesUpdate Type Exposition complete ConsistencyNo Duplication Complete Update Partial Update YYYYY YYNYCase 1 YNYYCase 2 YNNYCase 3 NYYNN NYNNN NNYNN NNNNN View Updatability in PUP Update Strategy for PUP Exposition completeness Construction consistency Duplicate View updatability in PUP Well-formed View

30 Case study in PUP Case 0: Well-formed View Complete Exposition + Consistent Construction + No Duplication Case 1: Complete Exposition + Consistent + Duplication Partial update + touch one side of duplication is not translatable Case 2: Complete Exposition + In-Consistent + No-Duplication sub-tree rooted at inconsistent edge is not updatable Case 3: Complete Exposition + In-Consistent + Duplication case 1  case 2 Update Strategy for PUP Exposition completeness Construction consistency Duplicate View updatability in PUP

31 Round-Trip Update Problem (RUP) - View is the same structure and semantics as the original XML document. - RUP falls into Well-formed View. - Any Valid Updates on it are always Translatable TCP/IP Illustrated W. Stevens Addison-Wesley San Francisco One of the best books on TCP/IP. … IIDPIDbookidtitleauthor_IIDyear book IIDPIDreview IIDPIDaname author IIDpnamelocation publisher Complete exposition? YES Construction consistency? YES NO Duplication? YES Update Strategy for PUP Exposition completeness Construction consistency Duplicate View updatability in PUP

32 Where we are Motivation Related Work Background Problem Definition - Characterize the XML View Update Problem (XVUP) - Correct Translatability - Classify subproblems: RUP, PUP Update Strategy for PUP Rainfall System Experiment Study Contributions Conslusion

33 XAT Rewriter View Composer DB2 View Query Parsed Tree Multiple SQL updates SQL Generator User Query SQL XAT Executor XAT XAT Generator XQuery Parser View Query Oracle XQuery View Manager SQL-ServerSybase RDBMS XAT Information Collecter View Analyzer Valid Update Checker Update Decomposer Update Translator Update Propagator Meta -Data XAT View Query XAT Materialized data Process Step Process Flow Data Flow RDBMS Legend Rainfall Rainbow Query Engine Result XML

34 Function updateDecomposition (XAT t) begin XATleaves  get all leave node of XAT t resultUpdate  new array of RelationalUpdate for ( all node n in XATleaves ) up  new RelationalUpdate up.updateType  same type as root node type of XAT t while ( n is not null ) opUpdateDecomp(node, up) n  parent of node n decideUpdateType (up) put up into resultUpdate distinctResultUpdate(resultUpdate) End Function decideUpdateType (RelationalUpdate up) begin if ( up.updateType is insert or replace ) do nothing else if ( up.updateType is delete ) if ( up.updateColumns include all attributes of relation up.tableName ) up.updateType  delete else up.updateType  replace end Rainfall Update System Fundamental concept Update decomposition Update propagation Update Decomposition Algorithm

35 Update Decomposition Tagger Source Join Nav Source Function opUpdateDecomp( XATNode n, RelationalUpdate up) Begin if ( n is a Navigate node ) up.tableName  get table name from n if it has one else if ( n is a Select node or a Join node ) up.whereClause  condition in predicate of node n else if ( n is a Tagger node ) if ( up.updateType is delete ) if ( n.DOMpattern matches DOM pattern of the element node to be inserted ) up.updateColum.columnName  extract names of attributes from Tagger pattern if ( up.updateType is insert ) if ( n.DOMpattern matches DOM pattern of the element node to be inserted ) up.updateColumn.columnName  extract names of attributes from Tagger pattern up.updateColumn.columnValue  extract attribute values from pattern of inserted element if ( up.updateType is replace) if ( n.DOM pattern matches DOM pattern of the element node to replacing ) up.updateColum.columnName  extract names of attributes from Tagger pattern up.updateColumn.oldColumnValue  extract old values from relational database up.updateColumn.columnValue  extract values from pattern of the replacing element else do nothing return up end

36 Fundamental ---- connection Ownership connection Subset connectionReferencing connection X1 X2 X1=UK/PK(R1), X2  PK(R2) X1=UK/PK(R1), X2=PK(R2) X1=UK/PK(R1), X2  NK/UK(R2), Cardinality 1:n 1:[0,1] 1:n Representation R1 R2 R1 R2 R1 R2 R We divide Foreign key as three types: Inner-going Outer-going Rainfall Update System Fundamental concept Update decomposition Update propagation FK

37 Book Author Review State Publisher Prices PhoneBook 1. Delete 2. Delete 3. Delete 4. Delete 5. Replace Example for delete propagation -Dependency Island - Referencing peninsula Rainfall Update System Fundamental concept Update decomposition Update propagation

38 Example for insert propagation Book Author Review State Publisher Prices PhoneBook 1. Extend 2. (C1) Insert (C2) Reject (C3) Replace 3. Checking Rainfall Update System Fundamental concept Update decomposition Update propagation

39 Where we are Motivation Related Work Background Problem Definition - Characterize the XML View Update Problem (XVUP) - Correct Translatability - Classify subproblems: RUP, PUP Update Strategy for PUP Rainfall System Experiment Study Contributions Conclusion

40 Updating vs. Re-loading Note: (1) Loading strategy: shared inlining. (2) View is same complexity with document (RUP)

41 Translation for different update types Note: (1) Same View between update types (2) Update is same granularity

42 Performance among different translation steps Note: (1) Database size: number of books= 800. (2) Same view between different update types (3) Update is translatable (4) Update has same granularity

43 Where we are Motivation Related Work Background Problem Definition - Characterize the XML View Update Problem (XVUP) - Correct Translatability - Classify subproblems: RUP, PUP Update Strategy for PUP Rainfall System Experiment Study Contributions Conclusion

44 Contributions Characterize and propose a classification of the XML view update problem, and describe the updatability of each class. Present a decomposition-based update translation algorithm that correctly translates XQuery updates on views into a set of SQL-level updates. Implement Update System Framework (Rainfall) to implement the proposed strategy. Provide experimental results studying the performance of update strategies.

45 Conclusion We study the view update problem in XML context and provide solution for solving this problem Future work. - Ordersensitive view update - Batch update processing - Performance in update translation - Choose trigger for query plan optimization - Use index speeding up path expression evaluation - Use materialized view XAT to improve performance - re-write and optimize XAT - How to deal with schema changes

46 Thanks Advisor: Prof. Elke A. Rundensteiner. Co-advisor: Prof. Kathi Fisler. Group member: Mukesh Mulchandani in Rainfall system implementation. Xin Zhang and Rainbow group members in base system supporting.

47 Appendix Algorithm used in our Update Strategy

48 Dependency Island (DI) of root relation R - Rooted at R. - Maximal sub-tree. - All inner-going ownership and subset connections of R. Referencing Peninsula (RP) of root relation R - A relation Rj - Directly connected to any relation of dependency island R k via Reference connection Rk Rj Referenced Continent( RC) of root relation R - Rooted at R. - Maximal sub-tree. - All outer-going ownership / subset / reference connections of R. Dependency Island /Reference Peninsula R DI RP RC Rainfall Update System Fundamental concept Update decomposition Update propagation

49 View Mapping Graph (VMG) for running example book authorpublisherreview Rainfall Update System Fundamental concept Update decomposition Update propagation

50 Delete Propagation Assuming update is to delete a tuple t from relation R. (1)Isolate the dependency island DI of r. (2)For each relation in DI of r, delete all tuples dependent on t. (3)For each reference peninsula attached to DI of r, perform a replacement on the foreign key of each matching tuple. (4) For relations in DI of r that has dependency island, deletion is propagated( repeatedly, if necessary) to their DI. (5) For those relations involved in deletion, replacement is executed on their RP. Rainfall Update System Fundamental concept Update decomposition Update propagation

51 Insertion Propagation Assuming update is to insert a tuple t into relation R. (1)Extend the view tuple t as t' with values for the attributes that have been exposed out in the view definition. (2) Case 1: An identical tuple exists in R, reject the update. (3) Case 2: If t' does not match any key of underlying database relation, perform an insertion in R. Further, for RC of R, a check-insertion operation is done. (4)Case 3: If t' matches the key of an existing tuple, but some values for non-key attributes differ. If R has dependency island, reject the update, otherwise, performe replacement of t with t'. Rainfall Update System Fundamental concept Update decomposition Update propagation