schema advisor for hybrid relational-xml dbms moro, lim and chang presented by wuliang sun

16
Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Upload: nathan-goodwin

Post on 03-Jan-2016

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Schema Advisor for Hybrid Relational-XML DBMS

Moro, Lim and Chang

Presented by Wuliang Sun

Page 2: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Introduction

Data Persistence– Relational Data– XML

ReXSA (Relational-XML Schema Advisor)– Help data architects design database schemas for

both relational and XML data

Page 3: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

XML (benefits from XML)

XML– Self-documenting – Flexible– Widely accepted

<account>This account is seldom used any more.<account-number> A-102 </account-number><branch-name> Perryridge </branch-name><balance> 400 </balance><description> </description></account>

CREATE TABLE account (account_ID bigint NOT NULL PRIMARY KEY, accountX XML);

Page 4: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Information Model

Business Artifacts– Contracts, resumes, reference letter

Schema Variability– Sparse data, optional attributes

Schema Evolution Data Versioning

Page 5: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Relational-XML Schema Advisor

Input: A logical data model annotated with information on business artifacts, schema variability and evolution, versioning, and a threshold t

Output: A Set of DDL Statements (relational-XML schema designs)

Page 6: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Two phases for schema advisor

– Score each entity and partition entities into relational type or XML type

– Transforms the partitioned logical data model into table definition and XML schemas

Page 7: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Score Entity

Score = countFlexAttribs / countAttribs OR 1 if entity is business artifact

Score(Person) = 0.4 Score(Faculty) = 0.4Score(Resume) = 1

Page 8: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Mapping Relationship

REL-REL Relationship XML-REL Relationship

– [A:XML] – 0..1 -<R> - 1 – [B:REL]– [A:XML] – N -<R> - 1 – [B:REL]– [A:XML] – 1 -<R> - N – [B:REL]– [A:XML] – M -<R> - N – [B:REL]

XML-XML Relationship– [A:XML] – 0..1 -<R> - 1 – [B:XML]– [A:XML] – N -<R> - 1 – [B:XML]– [A:XML] – N -<R> - M – [B:XML]

Page 9: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Mapping Relationship (XML-REL)

[A:XML] – M -<R> - N – [B:REL]

Page 10: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Mapping Relationship (XML-XML)

[A:XML] – N -<R> - 1 – [B:XML]

Page 11: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Mapping Entity Hierarchies

Mapping Entities from a hierarchy Mapping Relationships from a hierarchy

– Parent Relationship– Children Relationship– Parent and Children Relationship

Page 12: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Mapping Entity Hierarchies

Example of an entity hierarchy for students and courses in a university

Tables for merged courses and the respective student tables.

Page 13: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Apply ReXSA

Threshold = 60%

Page 14: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Apply ReXSA

*Resume and Education are defined as business artifacts

Page 15: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Apply ReXSA

DDL statements for academic example

Page 16: Schema Advisor for Hybrid Relational-XML DBMS Moro, Lim and Chang Presented by Wuliang Sun

Conclusion

User defined threshold is not rigid. Mapping relationship from a hierarchy is not

perfect. Lack the measurement for the quality of

mapping