1 / 30

Applications of ORA-SS: An Object-Relationship-Attribute Model for Semistructured Data

Applications of ORA-SS: An Object-Relationship-Attribute Model for Semistructured Data. Tok Wang Ling 1 Mong Li Lee 1 Gillian Dobbie 2 1 Department of Computer Science, National University of Singapore 2 Department of Computer Science, The University of Auckland, NZ. Content.

Télécharger la présentation

Applications of ORA-SS: An Object-Relationship-Attribute Model for Semistructured Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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

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

  5. ORA-SSThe 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-SSThe 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. student number first name last name The data model of ORA-SSObject Class • attributes of object class • ordering on object class Figure 4: Object class student with attributes in an ORA-SS schema diagram

  8. project member publication p1 pub1 m1 pub2 p2 m2 p3 pub3 project ▼♦ project 2, +, + ♦ id ♦ name ▼♦ member member ♦ name id name ♦ job title 2, *, + ▼♦ publication ♦ number name job title ♦ title publication number title The data model of ORA-SSRelationship 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 (c) Dataguide (a) ORA-SS Schema Diagram (b) Instance Relationship Figure 5: Representing binary relationship type

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

  10. course cs 2, 4:n, 3:8 code * student title ANY cs cs dept prefix D: comp number * student number first name last name mark grade The data model of ORA-SSAttribute • 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 hobby Figure 7: Object classes with relationship type and attributes in an ORA-SS schema diagram

  11. book 2, 1:1, 1:1 < content < * cc, 3, 1:n, 1:1 author title chapter preface toc 4, 1:n, 1:1 paragraph text The data model of ORA-SSOrdering • 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 < < Figure 8: Ordered object classes and attributes in an ORA-SS schema diagram

  12. The data model of ORA-SSDisjunction course • disjunctive object class, and • disjunctive attribute. 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. faculty course cs, 2, 4:n, 3:8 fs, 2, 1:n, 1:n faculty name code title student student fs, * faculty grade history grade home hostel street number The data model of ORA-SSReferences 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-SSReferences (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 2, +, + cs, 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-SSReference (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. grade name code title 3:8 sc 4:n course student 1:n 1:1 ct sct hours feedback 1:n 1:n ta address tutor UNION name office hostel home room building name street number The data model of ORA-SSReference (cont.) Figure 14: ER diagram of schema in Figure 13.

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

  18. person student sc, 2,+,+ ssn student student number course student number 3,+,+ 3,+,+ tutor grade title faculty tutor degree payrate ssn ssn payrate degree The data model of ORA-SSInheritance Hierarchy 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. department department 2,1:1,1:n ed, 2,1:1,1:n name name department number department number employee employee ed ? ? ssn ssn name name jdate jdate The data model of ORA-SSConstraints • Inclusion dependency • Semantic dependencies (b) Date of employee joined department (a) Date of employee joined company 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. professor 2 staff# name course 2 C.Code title textbook + title author ISBN Research Topics for ORA-SS ModelNormal Form ORA-SS Schema Diagram • Schema may have a lot of redundant data • Update anomalies • Normal Form schema is needed

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

  23. Research Topics for ORA-SS ModelStorage 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 SP 2 + Name City S# SP Price Part SPJ 3 P# Name Color Project SPJ J# Name Loc Qty Research Topics for ORA-SS ModelStorage 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#]

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

  26. Research Topics for ORA-SS ModelViews (cont.) • Valid views of an ORA-SS schema • Operations: selection, projection, join, up/down Project Project Part Supplier 2 2 2 Part Part Supplier Part 2 2 2 3 3 2 3 price price Supplier Project Project total_qty 2 3 3 3 price Qty Qty Qty View 1 View 2 View 3

  27. Research Topics for ORA-SS ModelViews (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. Research Topics for ORA-SS ModelEvaluating 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. Research Topics for ORA-SS ModelTranslating 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-SSSummary • 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

More Related