Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conceptual Modeling for XML Data

Similar presentations


Presentation on theme: "Conceptual Modeling for XML Data"— Presentation transcript:

1 Conceptual Modeling for XML Data
Tok Wang Ling National University of Singapore DASFAA’2003 Panel Discussion

2 Outlines Why do we need conceptual modeling?
What are the important semantic information to be captured? Uses of conceptual model for some XML research topics

3 Motivation: Why do we need to have a conceptual model to represent XML Data?
<department number =“cs”> <name> computer science</name> <course number = “cs4221”> <name> Database </name> <student number = “1234” > <name> B.Y.Smith</name> <grade> 70</grade> </student> <student number=“1235”> <name> C.U.Brown </name> <grade> 60</grade> </course> </department> <! ELEMENT department (name,course+)> <! ATTLIST department number ID #REQUIRED> <! ELEMENT course (name, student*)> <! ATTLIST course <! ELEMENT student (name, grade?)> <! ATTLIST student number CDATA #REQUIRED> <! ELEMENT name (#PCDATA)> <! ELEMENT grade (#PCDATA)> (b) An XML DTD for (a) (a) XML document

4 ▼♦ department ▼♦ student ▼ ♦ course ♦ name ♦ number ♦ grade Motivation (cont.) department cs student number name computer science &3 &1 course &20 &21 &22 grade 1234 B.Y.Smith 70 1235 C.U. Brown 60 cs4221 Database &26 &7 &4 &2 &5 &6 &23 &24 &25 &27 &28 (B) Dataguide (a) OEM Diagram Figure 1: Sample instance demonstrating OEM and dataguide

5 Motivation (continue)
Q: What are the important semantic information and constraints cannot be captured by the DTD and Dataguide? What are the object classes? department, course, student? Attributes of object classes? Identifiers of object classes? What are the relationship types defined among object classes? e.g. Relationship types among department, course, student? What is “grade”? Object class? Attribute of student? Are there redundancies?

6 Semantic Information to be captured by an XML conceptual model
Object class attributes of object class ordering on object class Relationship Type Represent hierarchical structure degree of n-ary relationship type participation constraints of object classes in relationship type attributes of relationship type disjunctive relationship type recursive relationship type Reference

7 Semantic Information to be captured by an XML conceptual model (cont.)
Attribute key attribute / identifier composite attribute disjunctive attribute attributes with unknown structure fixed and default values of attribute derived attribute Functional dependencies and other constraints Inheritance hierarchy (class hierarchy) Semi-structured data instance representation

8 Attribute or object class Degree of relationship type
Q: What are the semantic information cannot be represented by Dataguide, DTD, XML Schema? Attribute or object class Degree of relationship type Attibute of object class or relationship type Class hierarchy Functional dependency

9 Figure 2: ORA-SS instance diagram
A solution: ORA-SS, an object-relationship attribute model for semi-structured data. department Number: CS Name: Computer Science course course student student student Number Name Number: CS4221 Name: Database number department course 2, 1:n, 1:1 student name grade cs number: 1234 Name: B.Y. Smith number: 1235 Name: C.U. Brown Grade: 70 Grade: 60 Figure 2: ORA-SS instance diagram Figure 3: ORA-SS schema diagram

10 The data model of ORA-SS - Relationship Type
attributes of relationship type degree of n-ary relationship type participation constraints of objects in relationship type disjunctive relationship type recursive relationship type project id name member job title publication number title 2, +, + 2, *, + p1 p2 p3 m1 m2 pub1 pub2 pub3 project member publication ♦ number ▼♦ publication ▼♦ project ▼♦ member ♦ name ♦ title ♦ job title ♦ id (a) ORA-SS Schema Diagram (b) Instance Relationship (c) Dataguide Figure 5: Representing binary relationship type

11 The data model of ORA-SS - Relationship Type (cont.)
pub1 pub2 pub3 project member publication project id name member job title publication number title 2, +, + 3, *, + (b) Instance Relationship ♦ number ▼♦ publication ▼♦ project ▼♦ member ♦ name ♦ title ♦ job title ♦ id (a) ORA-SS Schema Diagram (c) Dataguide Figure 6: Representing ternary relationship type

12 The data model of ORA-SS - Attribute
key attribute composite attribute disjunctive attribute attribute with unknown structure fixed and default values of attribute derived attribute course student * code title ANY dept prefix D: comp number first name last mark grade cs 2, 4:n, 3:8 hobby Figure 7: Object classes with relationship type and attributes in an ORA-SS schema diagram

13 Uses of the Conceptual model for XML research
Normal form XML schema remove redundant data resolve multiple inheritance conflicts Storage structure for XML databases use Object Relational Model XML Views derived information from references and class hierarchy defining views materialized view maintenance view updates Integration of XML documents Evaluating XML queries on XML databases

14 Research Topics using ORA-SS Model Normal Form XML Schema
Schema may have a lot of redundant data Update anomalies Normal Form schema is needed title author ISBN 2 professor textbook staff# name course C.Code +

15 Research Topics using ORA-SS Model NF XML Schema (cont.)
Some better solutions: Redundancies are removed, in normal form ISBN title author professor textbookR staff# name courseR C.Code course textbook + textbook-Ref course-Ref C.Code title ISBN author professor textbookR name professorR course textbook + textbook-Ref professor-Ref staff#

16 Research Topics using ORA-SS Model Storage Structure for XML Databases
Main Rules Each object class together with its attributes form a nested relation (object relation) Each relationship type together with its attributes form a nested relation (relationship relation) Nested relations can be handled by Object Relational model, e.g. ORACLE 8i.

17 Research Topics using ORA-SS Model Storage Structure for XML Databases
Object Relations Supplier (S#, Name, (City)) Part (P#, Name, color) Project(J#, Name, Loc) Relationship relations SP (S#, P#, price) SPJ (S#, P#, J#, Qty) Constraint: SPJ[S#, P#]  SP[S#, P#] Price SP SPJ 3 Loc City Name J# 2 Supplier Project Part + Color Qty S# P#

18 Research Topics using ORA-SS Model XML Views
What information can be directly derived from references and class hierarchy code faculty grade history fs cs fs, 2,1:n,1:n name title cs, 2,4:n,3:8 course studentR student number * street hostel home | street number name cs title course code student grade | hostel home Referencing an object class in an ORA-SS schema diagram

19 Research Topics using ORA-SS Model XML Views (cont.)
Valid views of an ORA-SS schema Operations: selection, projection, join, up/down Supplier Part Project Project 2 2 2 Part Supplier Part Part 2 2 3 3 2 2 3 price price Project Project Supplier total_qty 2 3 3 3 price Qty Qty Qty View 1 View 2 View 3

20 Conclusion A good conceptual model is needed for XML database applications: * normal form schema * storage structure * view design and view updates * ….


Download ppt "Conceptual Modeling for XML Data"

Similar presentations


Ads by Google