1 / 31

A CASE Tool for Designing XML Views

A CASE Tool for Designing XML Views. Yabing Chen, Tok Wang Ling, Mong Li Lee May, 2002. Contents . Introduction Preliminaries Architecture of the CASE tool An illustrating example Related work Conclusion Q & A. Part 1. Introduction. Introduction. XML – eXtensible Markup Language

abdalla
Download Presentation

A CASE Tool for Designing XML Views

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A CASE Tool for Designing XML Views Yabing Chen, Tok Wang Ling, Mong Li Lee May, 2002

  2. Contents • Introduction • Preliminaries • Architecture of the CASE tool • An illustrating example • Related work • Conclusion • Q & A

  3. Part 1. Introduction

  4. Introduction • XML – eXtensible Markup Language • XML Views • An introduction to the CASE tool – XVS

  5. Introduction XML – eXtensible Markup Language • XML – originally a document markup language. • XML – now standard for publishing and exchanging data on the web. • XML – enforces explicit structuring. • XML – suitable for express more structured data.

  6. Introduction XML Views • XML views are analogous to Relational views. • They provide logical data independence that masks changes in the conceptual schemas. • They also increase the flexibility of a database that allows multiple users to see the data in different ways. • XML Views are implemented as an mediator on top of the database. • Rlational database, such as Oracle 9i, SQL Sever. • Native XML database, such Software AG Tamino.

  7. Introduction An introduction to the CASE tool - XVS • XVS – XML Views System. • a novel case tool for designing XML views. • Provides for a graphical views design facility. • Validates all designed views. • Stores XML data in an object-relational database.

  8. Part 2. Preliminaries

  9. Preliminaries • ORA-SS data model • View Definition Language

  10. Preliminaries ORA-SS data model • ORA-SS – Object-Relationship-Attribute Semi Structured data model. • Three basic concepts: object classes, relationship types and attributes. • Object class – an entity type in ER diagram or an element in XML. • Relationship type – indicate existing semantic relationships among object classes. • Attributes – properties, may belong to object classes or relationship types.

  11. Preliminaries ORA-SS data model (cont.) • An object class – a labeled rectangle. • A relationship type – (name, n, p, c) • An attribute – a labeled circle.

  12. Preliminaries ORA-SS data model (cont.) • ORA-SS – A semantically rich data model. • Reflects nested structure of semistructured data. • Distinguishes between object classes, relationship types and attributes. • Distinguishes between attributes of relationship types and attributes of object classes. • Such semantics is essential for designing valid XML views and efficient storage. • However, existing data model cannot support such semantics.

  13. Preliminaries View Definition Language • W3C standard – XQuery. • We adopt FLWR expression to define views. • FLWR expression – For, Let, Where and Return clauses. • We also adopt XQuery as the query language to query views.

  14. Part 3. Architecture of the CASE tool

  15. Architecture of the CASE tool Figure 3. The Architecture of the CASE tool

  16. Architecture of the CASE tool Modules of our system • Transform/Enrich ORA-SS. • This module takes an XML document and generates the corresponding ORA-SS graphical schema diagram. • It also allows users to enrich the ORA-SS schema diagram to add necessary semantic information for XML views design. • Design graphical view schema. • This module allows users to graphically design views over source schema. • Generate view definition. • This module generates a view definition in FLWR expression from the graphical view schema.

  17. Architecture of the CASE tool Modules of our system (cont.) • Query Rewrite • This module rewrite a XQuery over the view into SQL query over the source database. • Generate XML result • This module tags the resulting table returned by SQL query. • Then it generates the resulting XML document. • Materialize view • This module executes the XQuery expression in the view definition and generates the view documents.

  18. Part 4. An illustrating example

  19. An illustrating example • Mapping XML document to ORA-SS schema diagram • Defining views • Rewriting XQuery

  20. An illustrating example 1. Mapping XML document to ORA-SS schema diagram • Transform an XML document to ORA-SS <db> <project jno=”j001”> <supplier sno=“s001”> <part pno=“p001”> <price> 100</price> </part> </supplier> <supplier sno=“s002”> <part pno=“p001”> <price> 100</price> </part> </supplier> </project> </db> Figure 4. An XML document on project, supplier and part Figure 5. The ORA-SS schema diagram of the XML document

  21. An illustrating example 1. Mapping XML document to ORA-SS schema diagram • Enrich the ORA-SS schema with semantics. Figure 5. The ORA-SS schema diagram of the XML document Figure 6. The ORA-SS schema diagram enriched with semantics

  22. An illustrating example 2. Defining views • Designing a view by selecting, dropping or restructuring on the ORA-SS schema.

  23. An illustrating example 2. Defining views (cont.) • Mapping the view schema to a view definition in XQuery expression. Create View As swap-supplier-part For $j In document("spj.xml")//project Return <project jno={$j/@jno}> { for $pn In distinct($j//part/@pno) Return <part pno={$pn}> { For $s In $j/supplier[part/@pno=$pn] Return <supplier sno={$s/@sno}> { For $p In $s/part[@pno=$pn] Return <price> {$p/price/text()} </price> } </supplier> } </part> } </project> • The mapping process may be divided into two steps: • Mapping the view schema to an intermediary view definition, which is generated according to the operation on the view schema. • Mapping the intermediary definition to the view definition in XQuery expression. Figure 10. The View definition in XQuery expression

  24. An illustrating example 3. Rewriting XQuery • Users may issue an XQuery on the views. • The following query retrieves all suppliers that supply part “p001” in project “j001” For $s In view(“swap-supplier-part”)//project[@jno=”j001”]/part[@pno=”p001”]/supplier Return <supplier sno={$s/@sno}> {$s/price} </supplier> Select supplier.sno supplier_part.price From supplier, supplier_part , spj Where spj.jno=’j001’ and spj.pno=’p001’ and supplier.sno=spj.sno and supplier_part.sno=supplier.sno and supplier_part.pno=’p001’ Figure 11. An XQuery on the view Figure 12. The rewritten SQL query

  25. An illustrating example 3. Rewriting XQuery (cont.) • We will first get the resulting table shown in figure 12. • After tagging, we will get the XML document shown in figure 13. <result> <supplier sno="s001"> <price>100</price> </supplier> <supplier sno="s002"> <price>100</price> </supplier> </result> tagging Figure 12. The result in table form Figure 13. The result in XML form

  26. Part 5. Related Work

  27. Related Work ActiveViews system & MIX system • ActiveViews system. • Adopt XML as the data model to define view. • Every view is presented as an object. • A view includes not only data, but also method. • MIX system. • It provides a virtual view of underlying heterogeneous sources. • It adopts XML DTD as the data model. • Most other works export relational data as XML views, such as XPERANTO, etc,.

  28. ActiveViews system [AAC+99] MIX system [BGL+99] XVS (our system) Data model XML XML DTD ORA-SS Storage O2 system N/A ORDBMS View definition language OQL-style language XMAS language XQuery language Query language Lorel language XMAS language XQuery language Validation of views No No Yes Support projection, join and restructuring of views No No Yes Support graphical views design No No Yes Related Work Comparison

  29. Part 6. Conclusion

  30. Conclusion • A CASE tool for XML views – XVS • Preliminaries • ORA-SS as the data model. • XQuery as the view language. • Novel features • More flexible XML views. More operation such as projection, join and restructuring. • Validating XML views. • Future work • Query optimization • View update

  31. Q & A

More Related