A CASE Tool for Designing XML Views - PowerPoint PPT Presentation

About This Presentation
Title:

A CASE Tool for Designing XML Views

Description:

XMAS language. XQuery language. Query language. Lorel language. XMAS language. XQuery language. Validation of views. No. No. Yes ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 32
Provided by: HPNT
Category:
Tags: case | xml | designing | tool | views

less

Transcript and Presenter's Notes

Title: A CASE Tool for Designing XML Views


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
XML eXtensible Markup Language
Introduction
  • 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
XML Views
Introduction
  • 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
An introduction to the CASE tool - XVS
Introduction
  • 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
ORA-SS data model
Preliminaries
  • 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
ORA-SS data model (cont.)
Preliminaries
  • An object class a labeled rectangle.
  • A relationship type (name, n, p, c)
  • An attribute a labeled circle.

12
ORA-SS data model (cont.)
Preliminaries
  • 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
View Definition Language
Preliminaries
  • 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
Modules of our system
Architecture of the CASE tool
  • 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
Modules of our system (cont.)
Architecture of the CASE tool
  • 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
1. Mapping XML document to ORA-SS schema diagram
An illustrating example
  • Transform an XML document to ORA-SS

ltdbgt ltproject jnoj001gt ltsupplier
snos001gt ltpart pnop001gt
ltpricegt 100lt/pricegt lt/partgt
lt/suppliergt ltsupplier snos002gt
ltpart pnop001gt ltpricegt
100lt/pricegt lt/partgt lt/suppliergt
lt/projectgt lt/dbgt
Figure 4. An XML document on project, supplier
and part
Figure 5. The ORA-SS schema diagram of the XML
document
21
1. Mapping XML document to ORA-SS schema diagram
An illustrating example
  • 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
2. Defining views
An illustrating example
  • Designing a view by selecting, dropping or
    restructuring on the ORA-SS schema.

23
2. Defining views (cont.)
An illustrating example
  • 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
ltproject jnoj/_at_jnogt for pn In
distinct(j//part/_at_pno) Return
ltpart pnopngt For
s In j/supplierpart/_at_pnopn
Return ltsupplier
snos/_at_snogt For p In
s/part_at_pnopn
Return ltpricegt
p/price/text() lt/pricegt
lt/suppliergt
lt/partgt
lt/projectgt
  • 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
3. Rewriting XQuery
An illustrating example
  • 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)//projec
t_at_jnoj001/part_at_pnop001/supplier Return
ltsupplier snos/_at_snogt
s/price lt/suppliergt
Select supplier.sno supplier_part.price From
supplier, supplier_part , spj Where
spj.jnoj001 and spj.pnop001 and
supplier.snospj.sno and supplier_part.snosupplie
r.sno and supplier_part.pnop001
Figure 11. An XQuery on the view
Figure 12. The rewritten SQL query
25
3. Rewriting XQuery (cont.)
An illustrating example
  • We will first get the resulting table shown in
    figure 12.
  • After tagging, we will get the XML document shown
    in figure 13.

ltresultgt ltsupplier sno"s001"gt
ltpricegt100lt/pricegt lt/suppliergt
ltsupplier sno"s002"gt
ltpricegt100lt/pricegt lt/suppliergt lt/resultgt
tagging
Figure 12. The result in table form
Figure 13. The result in XML form
26
Part 5. Related Work
27
ActiveViews system MIX system
Related Work
  • 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
Comparison

Related Work
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
Write a Comment
User Comments (0)
About PowerShow.com