Title: Applications of ORA-SS: An Object-Relationship-Attribute Model for Semistructured Data
1Applications of ORA-SS An Object-Relationship-A
ttribute 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
2Content
- 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
3Motivation
(B) Dataguide
(a) OEM Diagram
Figure 1 Sample instance demonstrating OEM and
dataguide
4Motivation (cont.)
department
Number CS
Name Computer Science
course
course
student
student
Number
Student
Name
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
5ORA-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
6ORA-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
7The 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
8The 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
(c) Dataguide
(a) ORA-SS Schema Diagram
(b) Instance Relationship
Figure 5 Representing binary relationship type
9The data model of ORA-SSRelationship Type (cont.)
(b) Instance Relationship
(a) ORA-SS Schema Diagram
(c) Dataguide
Figure 6 Representing ternary relationship type
10The 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
hobby
Figure 7 Object classes with relationship type
and attributes in an ORA-SS schema diagram
11The 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
lt
lt
Figure 8 Ordered object classes and attributes
in an ORA-SS schema diagram
12The data model of ORA-SS Disjunction
- disjunctive object class, and
- disjunctive attribute.
course
cs, 2, 4n, 38
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
13The data model of ORA-SS References
cs
student number
course code
grade
name
Figure 10 Referencing an object class in an
ORA-SS Schema Diagram
14The data model of ORA-SS References (cont.)
course
2, 05, 1n
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
15The data model of ORA-SS Reference (cont.)
student
sc, 2, 38, 4n
name
course
ct, 2, ,
sc
sct, 3, 11, 1n
tutor
code
title
grade
ct
tutor
sct
hours
name
office
feedback
hostel
home
building
room
name
number
street
Figure 13 ORA-SS schema diagram
16The data model of ORA-SS Reference (cont.)
Figure 14 ER diagram of schema in Figure 13.
17The data model of ORA-SS Functional Dependencies
- student, course ? tutor
- tutor ? course
Figure 15 Functional dependencies diagram
18The data model of ORA-SS Inheritance 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
19The data model of ORA-SS Constraints
- 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
20Research 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
21Research 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
22Research Topics for ORA-SS Model NF ORA-SS
Schema Diagram (cont.)
- Some better solutions
- Redundancies are removed, in normal form
staff
23Research 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.
24Research 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
SPJS, P ? SPS, P
25Research Topics for ORA-SS Model Views
- What information can be directly derived from
references and class hierarchy
Referencing an object class in an ORA-SS schema
diagram
26Research Topics for ORA-SS Model Views (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 2
View 3
View 1
27Research 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
28Research 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
29Research 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
30Applications 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