schema advisor for hybrid relational-xml dbms moro, lim and chang presented by wuliang sun
TRANSCRIPT
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
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);
Information Model
Business Artifacts– Contracts, resumes, reference letter
Schema Variability– Sparse data, optional attributes
Schema Evolution Data Versioning
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)
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
Score Entity
Score = countFlexAttribs / countAttribs OR 1 if entity is business artifact
Score(Person) = 0.4 Score(Faculty) = 0.4Score(Resume) = 1
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]
Mapping Relationship (XML-REL)
[A:XML] – M -<R> - N – [B:REL]
Mapping Relationship (XML-XML)
[A:XML] – N -<R> - 1 – [B:XML]
Mapping Entity Hierarchies
Mapping Entities from a hierarchy Mapping Relationships from a hierarchy
– Parent Relationship– Children Relationship– Parent and Children Relationship
Mapping Entity Hierarchies
Example of an entity hierarchy for students and courses in a university
Tables for merged courses and the respective student tables.
Apply ReXSA
Threshold = 60%
Apply ReXSA
*Resume and Education are defined as business artifacts
Apply ReXSA
DDL statements for academic example
Conclusion
User defined threshold is not rigid. Mapping relationship from a hierarchy is not
perfect. Lack the measurement for the quality of
mapping