1 maintaining semantics in the design of valid and reversible semistructured views yabing chen, tok...

18
1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science National University of Singapore

Upload: irma-mcbride

Post on 29-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

1

Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views

Yabing Chen, Tok Wang Ling, Mong Li LeeDepartment of Computer Science

National University of Singapore

Page 2: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

2

Outline

Introduction Motivating Example Design Rules for Swap Operators Conclusion

Page 3: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

3

Introduction

XMLThe dominant standard for exchanging data

on the Internet XML Views

Exploit the potential of XMLSecure the source dataProvide an application-specific view

Page 4: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

4

Related Work XML Views on Relational Database

SilkRoute [1] [2] Two different language to define and query the views over relational data

XPERANTO [3] [4] uses a canonical mapping to create a default XML view from relational data

ROLEX [14] Uses XSLT to define XML views.

XML Views on XML Data Xyleme [15]

Define XML views using DTD ActiveView [16]

Define views with active features

[1]M. Fernandez, W. Tan, D. Suciu, “Efficient Evaluation of XML Middleware Queries”, ACM SIGMOD, pp. 103-114, 2001.[2] M. Fernandez, W. Tan, D. Suciu, “SilkRoute: Trading Between Relations and XML”, World Wide Web Conference, 1999.[3] M. Carey, J. Kiernan, J. hanmugasundaram, et. al., “XPERANTO: A Middleware for Publishing Object-Relational Data as XML Documents”, VLDB, pp. 646-648, 2000.[4] M. Carey, D. Florescu, Z. Ives, et. al., “XPERANTO: Publishing Object-Relational Data as XML”, WebDB Workshop, 2000. [15] Sophie Cluet, Pieanglo Veltri, Dan Vodislav, Views in a large scale xml repository, VLDB 2001, pp. 271-280.[16] Serge Abiteboul, Sophie Cluet, Laurent Mignet, et. Al. Active views for electronic commerce, VLDB 1999, pp.138-149.

Page 5: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

5

Weakness of related work

Disadvantage of the main related work Ignore semantic information in source data

For example, ignore the difference between object class, attribute and relationship in schema

Cannot check the validity of designed viewsDifficult to use query languages to define

views Proprietary language or XQuery

Page 6: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

6

Our approach

Our approach for XML views Our previous work

Design valid XML Views [9]

Based on a semantically rich model - ORA-SS [18] Use query operators, such as selection, drop, swap, join, etc.

Our current work (this paper) A complete set of rules for swap operators & reversible

views Maintain participation constraints for relationship types in

the views.

[9] Ya Bing. Chen, Tok Wang Ling, Mong Li Lee, “Designing Valid XML Views”, ER Conference, 2002[18] Gillian Dobbie, Xiao Ying Wu, Tok Wang Ling, Mong Li Lee, ORA-SS: An Object-Relationship-Attribute Model for SemiStructured Data, Technical Report TR21/00, School of Computing, National University of Singapore, 2000.

Page 7: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

7

Motivating Example ORA-SS data model

Object class – Rectangle Attribute – circle Relationship type – label on the

connection between object classes Difference between ORA-SS and

ER diagram ORA-SS is hierarchical structure ER is flat structure

Difference between ORA-SS and other XML models More semantics expressed. i.e.

differentiate object class and attribute, differentiate the relationship attributes and object class attributes

c o urs e

s tude nt le c ture r

tuto r

c o de t i t le

*

s tuN o nam e ho bby grade

s tfN o o f f ic e f eed b ac k

s tf N o nam e o f f ic e w o r k lo ad

c s ,2 ,1 :n,1 :n

c s t ,3 ,1 :n ,1 :n

c l ,2 ,1 :n ,1 :n

c s

c s t

c l

Page 8: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

8

Motivating Example (cont.)

Invalid view may be created by swapping course & student incorrectly Relationship attribute grade relocated wrongly. Relationship type cl disappears.

s tu d en t

c o u r s e lec tu r er

tu to r

s tuN o nam e*

c o de t i t le

gradeho bby

s tfN o o f f ic e f eed b ac k

s tfN o nam e o f f ic e w o r k lo ad

c s ,2 ,1 :n,1 :n

c s t ,3 ,1 :n,1 :n

c s

c s t

Swap course & student

c o urs e

s tude nt le c ture r

tuto r

c o de t i t le

*

s tuN o nam e ho bby grade

s tfN o o f f ic e f eed b ac k

s tf N o nam e o f f ic e w ork loa d

c s ,2 ,1 :n ,1 :n

c s t ,3 ,1 :n ,1 :n

c l ,2 ,1 :n ,1 :n

c s

c s t

c l

Source Schema Invalid view Schema

Page 9: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

9

Motivating Example (cont.)

Fortunately, valid view can be created based on our developed rules. Relationship attribute grade relocated correctly. Relationship type cl is kept in the view correctly.

Swap course & student

Source Schema Valid view Schema

s tu d en t

c o u r s e

lec tu r ertu to r

s tuN o nam e*

c o de t i t le grade

ho bby

s tfN o o f f ic e f eed b ac k s tfN o nam e o f f ic e w ork loa d

c s ,2 ,1 :n,1 :n

c s t ,3 ,1 :n,1 :nc s

c s t

c l , 2 , 1 :n, 1 :n

c l

c o urs e

s tude nt le c ture r

tuto r

c o de t i t le

*

s tuN o nam e ho bby grade

s tfN o o f f ic e f eed b ac k

s tf N o nam e o f f ic e w ork loa d

c s ,2 ,1 :n,1 :n

c s t ,3 ,1 :n ,1 :n

c l ,2 ,1 :n,1 :n

c s

c s t

c l

Page 10: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

10

Swap Operators

Our previous work Select, join and drop operator. Simple rules for swap operator

Our current work Detailed and complete rules for swap operator Reversible views

A view is reversible if its source schema can be produced back by applying swap operator on the view

Page 11: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

11

Swap Operator (cont.)

Rule Swap_1: move attributes of Oi and Oj with Oi and Oj

O a

O j

O i

k i a i

k j a j

Swap Oi & Oj

O a

O i

O j

k j a j

k i a i

Reversible by applying the same

rule

Page 12: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

12

Swap Operator (cont.)

Relationship types affected:

O a

O j

O i

O b

O c

O k

T h e F irstC a teg o ry

O d

O a

O j

O i

O b

O c

O k

T he SecondC a tegory

O d

O a

O j

O i

O b

O c

O k

O dT h e T h irdC a teg ory

The path from Oj up to Oi and its ascendants

The path involving Oi and its branch object class

The path involving Oj and its descendants

Page 13: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

13

Swap Operator (cont.)

Rule Swap_2: handles the first category of relationship types Attach attributes of R at the lowest object class Reason: keep the relationship attributes meaningful in the view

Property of first category of relationship types: The path from Oj up to Oi and its ascendants

O a

O j

O i

R(O i ,O a ,O j)

a ttr ib ute

R

Swap Oi & Oj

O a

O i

O j

R(O i ,O a ,O j)

a ttr ib ute

R

Reversible by applying the same

rule

Page 14: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

14

Swap Operator (cont.)

Rule Swap_3: handles the second category of relationship types Attach sub trees of Oi or Oa to Oi Reason: keep the relationship meaningful in the view

Property of the second category of relationship types: The path involving Oi and its branch object classes

O a

O j

O i

R 1 ( O i , O b )

O b

O c

R 2 ( O i , O a, O c)

Swap Oi & Oj O a

O i

O j

R 1 ( O i , O b )

O bO c

R 2 ( O i , O a, O c)Reversible by

applying the Rule Swap_4

Page 15: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

15

Swap Operator (cont.)

Rule Swap_4: handle the third category of relationship types Move sub trees of Oj accordingly Reason: keep the relationship meaningful in the view

Property of the third category of relationship types: The path involving Oj and its descendants

O a

O j

O i

R 1 ( O a, O j , O k )

O e

O d

R 2 ( O a, O j , O d )

O k

R 3 ( O i , O j , O d , O e)

O a

O i

O j

R 1 ( O a, O j , O k )

O e

O d

R 2 ( O a, O j , O d )

O k

R 3 ( O i , O j , O d , O e)

Swap Oi & Oj

Reversible by applying the Rule

Swap_3 & 4

Page 16: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

16

Conclusion

An approach to maintaining semantics in designing views A complete set of rules for the swap operator Keep the relationship types correct in the views Maintain the view reversibility

The first work to maintain semantics (i.e. relationship types)

Provide for a more robust view mechanism to guarantee the valid views design

Page 17: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

17

Thanks!

Page 18: 1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science

18

References 1. Serge. Abiteboul, S. Cluet, L. Mignet, et. al., “Active views for electronic commerce”, VLDB, pp.138-149, 1999.

2. Chaitanya. Baru, A. Gupta, B. Ludaescher, et. al., “XML-Based Information Mediation with MIX”, ACM SIGMOD

Demo, 1999.

3. Michael. Carey, J. Kiernan, J. hanmugasundaram, et. al., “XPERANTO: A Middleware for Publishing Object-

Relational Data as XML Documents”, VLDB, pp. 646-648, 2000.

4. Michael. Carey, D. Florescu, Z. Ives, et. al., “XPERANTO: Publishing Object-Relational Data as XML”, WebDB

Workshop, 2000.

5. Ya Bing. Chen, Tok Wang Ling, Mong Li Lee, “Designing Valid XML Views”, ER Conference, 2002

6. Ya Bing Chen, Tok Wang Ling, Mong Li Lee, “Automatic Generation of SQLX Definitions from ORA-SS Views”,

DASFAA, 2004.

7. Sophie. Cluet, P. Veltri, D. Vodislav, “Views in a large scale xml repository”, VLDB, pp. 271-280, 2001.

8. Gillian. Dobbie, X.Y Wu, T.W Ling, M.L Lee, “ORA-SS: An Object-Relationship-Attribute Model for SemiStructured

Data”, Technical Report TR21/00, School of Computing, National University of Singapore, 2000.

9. Mary. Fernandez, W. Tan, D. Suciu, “Efficient Evaluation of XML Middleware Queries”, ACM SIGMOD, pp. 103-114,

2001.

10. Mary. Fernandez, W. Tan, D. Suciu, “SilkRoute: Trading Between Relations and XML”, World Wide Web

Conference, 1999.

11. Philip. Bohannon, H. Korth, P. Narayan, S. Ganguly, and P. Shenoy. Optimizing view queries in ROLEX to support

navigable tree results. VLDB, 2002.

12. Alin. Deutsch and V. Tannen. MARS: A System for Publishing XML from Mixed and Redundant Storage. VLDB, 2003.