Download presentation
Presentation is loading. Please wait.
1
Ling Wang, Mukesh Mulchandani Advisor: Elke A. Rundensteiner Rainbow Research group, DSRG, WPI Updating XQuery Views over Relational Data
2
XML is a standard for information exchange over internet But RDBMS is mature - Mature query optimization techniques - High query performance Research topic on dealing with XML using relational technology - Publishing XML over relational database: SilkRoute (AT&T), XPERANTO (IBM), RAINBOW(WPI) - Storing XML into RDBs LegoDB (BellLab), RAINBOW (WPI) Support Update features is important next step for those system Our Work will focus on Content updates using XQuery language Motivation
3
Sub-Problem 1: Expressing updates in XQuery We need to: - Extension to XQuery - Extension to XML query Parser to support Update features Sub-Problem 2: Translate XQuery update on Virtual View into SQL update on RDB We need to: - Mapping from XML with Relational data model ---- detecting View Updatability - Mapping XQuery update on virtual view into SQL update on Relational table ---- update translation Problem Definition RDBMS View Query XML View XQuery Update SQL Update RDBMS
4
Solution for sub-problem1: Query 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 | RENAME $child To new_name | 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.
5
Solution for sub-problem2: Update Translation Four aspect have to be explored: Correct Update Translatability Definition General Classification of XML View Update(XVUP) View Updatability Detecting Valid Update Translation
6
Correct Update Translatability No side effect One Step changes - Each database tuple is affected by at most one step of update operation - Implications: No order between update operation Could affect same table several times Minimal changes - No valid translation is subset of current translation - No extraneous updates Replacement can not be simplified - Two replace could get same result, pick simple one - Replace the minimum attribute set No insert-delete pairs - Replace is cheaper than Insert/Delete pair
7
Virtual View Definition Underlying Relation RDB Schema Integrity Constraints (Key, FK) Deletion Insertion Replacement Rename Move Set of each Group Update Schema Change Duplicates Aggregation Recursion Hierarchy Consistency Key Exposition Non Correlation predicates attribute exposition Correlation predicates attributes exposition BCNF 3NF Information Modification Instance Language Local Constraints (Not Null, domain) 2NF 1NF General Classification of XQuery View Update Problem Space
8
View FeaturesUpdate Type Exposition complete ConsistencyNo DuplicationComplete Update Partial Update YYYYY YYNYCase 1 YNYYCase 2 YNNYCase 3 NYYNN NYNNN NNYNN NNNNN View Updatability
9
Case study for View Updatability Case 1: Complete Exposition + Consistent + Duplication Partial update + touch 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 - case2 case 3, same as case 2 for inconsistent part - partial update touch duplication is not translatable
10
Parser View Analyser Valid Update Checker Translatability Checker Update Decomposer Translator Update Propagation Execution Engine View DB Trigger SQL Update XQuery Valid Update Translation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.