Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tok Wang Ling1 Mong Li Lee1 Gillian Dobbie2

Similar presentations


Presentation on theme: "Tok Wang Ling1 Mong Li Lee1 Gillian Dobbie2"— Presentation transcript:

1 Applications of ORA-SS: An Object-Relationship-Attribute Model for Semistructured Data
Tok Wang Ling1 Mong Li Lee1 Gillian Dobbie2 1Department of Computer Science, National University of Singapore 2Department of Computer Science, The University of Auckland, NZ

2 Content Part I ORA-SS: An Object-Relationship-Attribute Model for Semistructured Data Object class Relationship Type Attribute Semistructured data instance Functional dependencies and other constraints Inheritance hierarchy Part II Research Topics using ORA-SS Model Normal form ORA-SS schema diagram Storage schema for ORA-SS/XML databases ORA-SS/XML views Evaluating XML queries on ORA-SS databases Translating relational schema into ORA-SS schema Integration of XML documents

3 Motivation Figure 1: Sample instance demonstrating OEM and dataguide
▼♦ department ▼♦ student ▼♦ course ♦ name ♦ number ♦ student number ♦ grade 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 student number &23 &24 &25 &27 &28 (B) Dataguide (a) OEM Diagram Figure 1: Sample instance demonstrating OEM and dataguide

4 Figure 2: ORA-SS instance diagram
Motivation (cont.) department Number: CS Name: Computer Science course course student student Number Name Student Number: CS4221 Name: Database student number department course 2, 1:n, 1:1 name grade cs Student number: 1234 Name: B.Y. Smith Student number: 1235 Name: C.U. Brown Grade: 70 Grade: 60 Figure 2: ORA-SS instance diagram Figure 3: ORA-SS schema diagram

5 Object class Relationship Type attributes of object class
ORA-SS The Data Model Object class attributes of object class ordering on object class Relationship Type attributes of relationship type degree of n-ary relationship type participation of objects in relationship type disjunctive relationship type recursive relationship type symmetric relationship type

6 ORA-SS The Data Model (cont.)
Attribute key attribute degree of n-ary relationship type composite attribute disjunctive attribute attributes with unknown structure ordering on attribute fixed and default values of attribute derived attribute Semistructured data instance Functional dependencies and other constraints Inheritance hierarchy

7 The data model of ORA-SS Object Class
attributes of object class ordering on object class student number first name last name Figure 4: Object class student with attributes in an ORA-SS schema diagram

8 The data model of ORA-SS Relationship Type
attributes of relationship type degree of n-ary relationship type participation of objects in relationship type disjunctive relationship type recursive relationship type symmetric 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

9 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

10 The data model of ORA-SS Attribute
key attribute degree of n-ary relationship type composite attribute disjunctive attribute attribute with unknown structure ordering on attribute 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

11 The data model of ORA-SS Ordering
the instances of an object class can be ordered, the values of an attribute can be ordered, and the set of attributes of an object class can be ordered book * content chapter paragraph title author preface toc text 2, 1:1, 1:1 < cc, 3, 1:n, 1:1 4, 1:n, 1:1 < < Figure 8: Ordered object classes and attributes in an ORA-SS schema diagram

12 The data model of ORA-SS Disjunction
disjunctive object class, and disjunctive attribute. course cs, 2, 4:n, 3:8 exam venue code title student address, 2, ?, + lecture theatre laboratory cs student number name grade hostel home street name name number Figure 9: Disjunctive attribute and relationship type in an ORA-SS schema diagram

13 The data model of ORA-SS References
course student code title grade faculty name fs, 2, 1:n, 1:n * history hostel home cs, 2, 4:n, 3:8 street number cs student number course code grade name Figure 10: Referencing an object class in an ORA-SS Schema Diagram

14 The data model of ORA-SS References (cont.)
course 2, 0:5, 1:n course code title Figure 11: Example of a recursive relationship type in an ORA-SS Schema Diagram student course cs, 2, +, + 2, +, + student course course number name number of students student number cs grade Figure 12: Symmetric relationship types in an ORA-SS schema diagram

15 The data model of ORA-SS Reference (cont.)
student sc, 2, 3:8, 4:n name course ct, 2, +, + sc sct, 3, 1:1, 1:n tutor code title grade ct tutor sct hours name office feedback hostel home building room name number street Figure 13: ORA-SS schema diagram

16 The data model of ORA-SS Reference (cont.)
student sc course ct feedback sct hours tutor name office building room hostel home number street grade code title 3:8 4:n 1:1 1:n UNION address ta Figure 14: ER diagram of schema in Figure 13.

17 The data model of ORA-SS Functional Dependencies
student, course  tutor tutor  course 1/n n/1 n/_ student course tutor sct Figure 15: Functional dependencies diagram

18 The data model of ORA-SS Inheritance Hierarchy
person payrate degree student tutor ssn number 3,+,+ grade title sc, 2,+,+ student number course faculty tutor ssn payrate degree ssn faculty staff number Student number (b) Inheritance Diagram staff number student number (a) ORA-SS Schema Diagram Figure 16: ORA-SS schema diagram and inheritance diagram

19 The data model of ORA-SS Constraints
Inclusion dependency Semantic dependencies 2,1:1,1:n jdate name ssn department employee ? number ed, 2,1:1,1:n jdate name ssn department employee ? number ed (a) Date of employee joined company (b) Date of employee joined department Figure 17: Modeling join date (jdate) ORA-SS schema diagram

20 Research Topics for ORA-SS Model
Normal form ORA-SS schema diagram remove redundant data resolve class hierarchy conflicts Storage schema for ORA-SS/XML databases use Object Relational Model ORA-SS/XML Views derived information from references and class hierarchy defining views materialized view maintenance view updates Evaluating XML queries on ORA-SS databases XML schema to ORA-SS Schema XML document to ORA-SS database Translating relational schema into ORA-SS schema Integration of XML documents

21 Research Topics for ORA-SS Model Normal Form ORA-SS Schema Diagram
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 +

22 Research Topics for ORA-SS Model NF ORA-SS Schema Diagram (cont.)
Some better solutions: Redundancies are removed, in normal form ISBN title author professor textbook staff# name course C.Code + C.Code title ISBN author professor textbook name course + staff#

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

24 Supplier (S#, Name, (City)) Part (P#, Name, color)
Research Topics for ORA-SS Model Storage Schema for ORA-SS/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#

25 Research Topics for ORA-SS Model 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 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

26 Research Topics for ORA-SS Model 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

27 Research Topics for ORA-SS Model Views (cont.)
Views from ORA-SS storage schema Main Rules The order of the object classes in a relationship relation can be changed. Object classes can be dropped from a relationship relation. In this case, the attributes of the relationships will have different cardinalities or change to some aggregate functions such as sum, max/min, average, etc. Other Topics on Views materialized views and maintenance view update problem

28 Related issues: Map XML schema to ORA-SS schema
Research Topics for ORA-SS Model Evaluating XML queries on ORA-SS Databases Related issues: Map XML schema to ORA-SS schema Extra information is needed Map ORA-SS schema to storage schema (OR model) Map XML documents to ORA-SS databases (using object relational model DBMS) Map XML queries to queries on the ORA-SS databases Need to handle recursions and wildcard such as *(any), |(or), !(not), etc. Result construction, i.e. to XML documents

29 Extra information needed:
Research Topics for ORA-SS Model Translating Relational Schema into ORA-SS Schema Extra information needed: FDs and keys Inclusion dependencies Semantic dependencies Main steps: Identify object classes and their attributes from object relations Identify relationship classes and their attributes from relationship relations Identify class hierarchy Identify non key constraint functional dependencies Generate ORA-SS/XML Views for applications. Similar to translating relational schema to OO schema

30 Applications of ORA-SS Summary
Introduced ORA-SS model Briefly discussed research topics using ORA-SS Model Normal form ORA-SS schema diagram Storage schema for ORA-SS/XML databases ORA-SS/XML views Evaluating XML queries on ORA-SS databases Translating relational schema into ORA-SS schema


Download ppt "Tok Wang Ling1 Mong Li Lee1 Gillian Dobbie2"

Similar presentations


Ads by Google