Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Display and Analysis Tools for Updating XML Views Display and Analysis Tools for Updating XML Views David Krolick and Alex Perry Advisor: Professor Elke.

Similar presentations


Presentation on theme: "1 Display and Analysis Tools for Updating XML Views Display and Analysis Tools for Updating XML Views David Krolick and Alex Perry Advisor: Professor Elke."— Presentation transcript:

1 1 Display and Analysis Tools for Updating XML Views Display and Analysis Tools for Updating XML Views David Krolick and Alex Perry Advisor: Professor Elke A. Rundensteiner MQP Presentation April 19, 2005

2 2 Motivation XML Views are important XML Views are important –Hide unimportant information –Organize data to meet user needs –Wrap heterogeneous data sources: XML XML Relational databases Relational databases Must support operations over Views: –Querying –Updating

3 3 Updating Database Through Views Relational Database XML Database XML View User Update SQL View Query XQuery

4 4 Valid Update Example pubidpubname A01McGraw-Hill A02 Simon & Schuster Inc. bookidtitlepubidprice9801TCP/IPA UnixA publisher book FOR $publisher IN document(“default.xml”)/publisher/row RETURN $publisher/pubid, $publisher/pubname FOR $book IN document(“default.xml”)/publisher/row WHERE ($publisher/pubid = $book/pubid) AND ($book/price > 0.00) RETURN { $book/bookid, $book/pubid } View Query (PublisherView.xml)Update Query FOR $root IN document(“PublisherView.xml”) UPDATE $root { INSERT A03 ACME ”9802” ”Windows” A } Primary KeyNon Key Legend Relational Database

5 5 Invalid Update Example pubidpubname A01McGraw-Hill A02 Simon & Schuster Inc. bookidtitlepubidprice9801TCP/IPA UnixA publisher book FOR $publisher IN document(“default.xml”)/publisher/row RETURN $publisher/pubid, $publisher/pubname FOR $book IN document(“default.xml”)/publisher/row WHERE ($publisher/pubid = $book/pubid) AND ($book/price > 0.00) RETURN { $book/bookid, $book/pubid } View Query (PublisherView.xml)Update Query FOR $root IN document(“PublisherView.xml”) UPDATE $root { INSERT A03 ACME ”9802” ”Windows” } Primary KeyNon Key Legend Relational Database

6 6 U-Filter “A lightweight XML View Update Checker” * Purpose: Analyze updatability of XML views –Constraint validation –Side-effect checking Process: –Use data structures (Annotated Schema Graphs) to: Analyze constraints of base data and extraction query Mark data structures to indicate translatability of updates * Wang, L., Rundensteiner, E., and Mani, Murali. “U-Filter: A Lightweight XML View Update Checker.” VLDB2005, April. 2005, Submitted.

7 7 U-Filter Overview Update Translation Engine Update Validation Schema-driven translatability Reasoning Condition Analysis Data-driven Translatability Checking OracleDB2SQL ServerSybase U-Filter Data Storage Annotated Schema Graph Generator ASG User Update QueryView Query / Pre-defined View Schema XML/RDB Schema Valid Conditionally Translatable Satisfied Unconditionally Translatable Error Message Translatable Update Query SQL Update Query Invalid Untranslatable Unsatisfied Data Conflicts ASG XML GUI

8 8 Purpose of our Project Implement and generate ASGs for U-Filter –viewASG for structure and constraints of XML Views –baseASG for structure and constraints of databases Create GUI to visually analyze constraints and updates –Displays: Queries, Graphs, Update Results

9 9 ASG Generator GUI RAINBOW View ASG Generator XAT Database Schema Extractor tableNames ASG Marker baseASGviewASG View ASG Extender viewASG relTables viewASGbaseASG markedASG Base ASG Generator relTables leafNodes

10 10 XAT Tagger – Contains hierarchy Combine – Specifies edge cardinality of * For – Contains data constraints in inner tree Select – Contains data constraints NavUnnest – Contains data label information Xin Zhang and Elke A. Rundensteiner. “XAT: XML Algebra for the Rainbow System”, Computer Science Department, WPI, Technical Report, WPI-CS-TR-02-24, July, 2002

11 11 View ASG Captures View Constraints IDNameTypeProperties N1BookView N1.1book N1.1.1title N book.titlestring Not Null BIDEIDTypeConditionsN1N1.1* book.pubid = “A1” N1.1N N1.1.1N ASGNodeAnnots ASGEdgeAnnots N1 N1.1 N1.1.1 N

12 12 Base ASG Captures Base Constraints IDNameTypePropertiesN1BookView N1.1book.title BIDEIDTypeConditionsN1N1.11 ASGNodeAnnots ASGEdgeAnnots N1 N1.1

13 13 Updatability Marking Marks –Update Context: Updatability with respect to all nodes SafeUnsafe –Update Point: Updatability with respect to descendant nodes CleanDirty Marks are analyzed to determine translatability –Unconditionally Translatable: Safe and Clean –Conditionally Translatable: Safe but Dirty –Untranslatable: Unsafe Implemented By Ming and Francisco for CS525 Class Project

14 14 U-Filter Display Goals –Accurately display graphs and queries –Provide a visual demonstration for better understanding of the system –Provide detailed output to aid in troubleshooting

15 15 U-Filter Display Architecture ASG Parser View Query DialogUpdate Query Dialog ASG GeneratorUpdatability Testing Grappa CreatorGraph Updator Update Display Window Graph and Query Display Window

16 16 U-Filter Display: Select Query U-Filter Display: Select Query

17 17 U-Filter Display: View Query U-Filter Display: View Query

18 18 U-Filter Display: View ASG U-Filter Display: View ASG

19 19 U-Filter Display: Base ASG U-Filter Display: Base ASG

20 20 U-Filter Display: Update Query U-Filter Display: Update Query

21 21 U-Filter Display: Marked ASG U-Filter Display: Marked ASG

22 22 U-Filter Display Evaluation HCI Considerations –Grappa –Organized Layout –Intuitive Design –Color Coding Evaluation –Iterative feedback from Ling Wang –Feedback from DSRG

23 23 Project Evaluation Test Cases –9 View Queries –Represent Different Nested Relationships –Utilize Xquery Core functions except: if / then / else Updatability Tests –Modified Marking Conditions Still in Progress…

24 24 Conclusion We generate two ASGs to hold hierarchy and constraints –View ASG is constructed from an XAT representing a Query View –Base ASG is constructed by querying an underlying database and the leaf nodes of the View ASG We created a GUI to facilitate –the creation, observation and marking of our ASGs –the checking and categorization of update queries

25 25 Project Challenges Reading and analyzing technical research papers Integrating code with a larger system (RAINBOW) and concurrent implementation with another group Working with legacy code that was partially broken and poorly documented A team member who didn’t contribute and dropped out near end of project Iterative development with specifications that were unclear to us, and final requirements

26 26 Technical Challenges Working with XQuery Views Using the Visitor and Strategy Patterns Interacting with Oracle through JDBC Finding and utilizing a good XML parser for parsing an XML schema document Designing and implementing GUI with the Grappa package

27 27 Acknowledgements We would like to thank: Elke Rundensteiner Ling Wang Song Wang DSRG Team For their help in our project

28 28 References Akif, Mohammad et al. Java XML Programmer's Reference. Apress, Apress Birbeck, Mark et al. Professional XML. Second Edition. Apress, Apress Dillon, Sean et al. Beginning Oracle Programming. Apress, Apress Harold, Elliotte Rusty. XML 1.1 Bible. 3rd Edition. John Wiley & Sons, John Wiley & SonsJohn Wiley & Sons Hólm, Bjarki et al. Oracle 9i Java Programming: Solutions for Developers using Java and PL/SQL. Apress, Apress Navarro, Ann, and White, Chuck. Mastering XML. Sybex, Sybex Wang, L., Rundensteiner, E., and Mani, Murali. “U-Filter: A Lightweight XML View Update Checker.” VLDB2005, April


Download ppt "1 Display and Analysis Tools for Updating XML Views Display and Analysis Tools for Updating XML Views David Krolick and Alex Perry Advisor: Professor Elke."

Similar presentations


Ads by Google