Tok Wang Ling1 Mong Li Lee1 Gillian Dobbie2

Slides:



Advertisements
Similar presentations
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Advertisements

Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
The Entity-Relationship Model
1 541: Database Systems S. Muthu Muthukrishnan. 2 Overview of Database Design  Conceptual design: (ER Model is used at this stage.)  What are the entities.
The Entity-Relationship (ER) Model
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Data modeling using the entity-relationship model Sept. 2012Yangjun Chen ACS Outline: Data modeling using ER-model (Chapter 3 - 3rd, 4th, 5th ed.)
Project 1 Assignment Building a mini-database for CCI in UNCC which includes entity sets: departments (CS,SIS, bioinformatics), faculties, courses given.
SPRING 2004CENG 3521 The Relational Model Chapter 3.
The Entity-Relationship (ER) Model CS541 Computer Science Department Rutgers University.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Modeling Your Data Chapter 2. Part II Discussion of the Model: Good Design/ Bad Design?
Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – ER Model.
Powerpoint 2006 PRESENTATION The University of Auckland New Zealand Marsden Fund A PVS Approach to Verifying ORA-SS Data Models Scott Uk-Jin Lee 1, Gillian.
1 The ORA-SS Approach for Designing Semistructured Databases Xiaoying Wu, Tok Wang Ling, Mong Li Lee National University of Singapore Gillian Dobbie University.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Data Modeling Using the Entity-Relationship Model
the Entity-Relationship Model
Lecture 2: Entity-Relationship Modeling
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
1 Designing Valid XML Views Ya Bing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science National University of Singapore.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity-Relationship Model Ch. 3
1 Maintaining Semantics in the Design of Valid and Reversible SemiStructured Views Yabing Chen, Tok Wang Ling, Mong Li Lee Department of Computer Science.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
CMPT 258 Database Systems The Entity-Relationship Model Part II (Chapter 2)
ICS 321 Spring 2011 High Level Database Models Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 2/7/20111Lipyeow.
ICS 321 Fall 2009 The Relational Model (ii) Asst. Prof. Lipyeow Lim Information and Computer Science Department University of Hawaii at Manoa 9/10/20091Lipyeow.
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
09/03/2009Lipyeow Lim -- University of Hawaii at Manoa 1 ICS 321 Fall 2009 Introduction to Database Design Asst. Prof. Lipyeow Lim Information & Computer.
Logical Design database design. Dr. Mohamed Osman Hegaz2 Conceptual Database Designing –Provides concepts that are close to the way many users perceive.
1 Conceptual Design using the Entity- Relationship Model.
Data Modeling Using the Entity-Relationship (ER) Data Model (Based on Chapter 3 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
1 M ATERIALIZED V IEW M AINTENANCE FOR THE X ML D OCUMENTS Yuan Fa, Yabing Chen, Tok Wang Ling, Ting Chen Yuan Fa, Yabing Chen, Tok Wang Ling, Ting Chen.
Data Modelling Using Entity-Relationship (ER) Model
1 Resolving Schematic Discrepancy in the Integration of Entity-Relationship Schemas Qi He Tok Wang Ling Dept. of Computer Science School of Computing National.
Lecture # 6.  A class of data models  Conveys semantic meaning  Implements databases more intelligently  Support more sophisticated user interfaces.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Chapter 3: Data Modeling Using the Entity-Relationship (ER) Data Model
Modeling Your Data Chapter 2 cs5421. Part II Discussion of the Model: Good Design/ Bad Design? cs5422.
1 Storing and Maintaining Semistructured Data Efficiently in an Object- Relational Database Mo Yuanying and Ling Tok Wang.
Data Modeling and Entity-Relationship Model I
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 CS122A: Introduction to Data Management Lecture #5 (E-R  Relational, Cont.) Instructor: Chen Li.
1 CS122A: Introduction to Data Management Lecture #4 (E-R  Relational Translation) Instructor: Chen Li.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Lecture # 16 July 26,2012 Data Modeling using the Entity Relationship.
Wenyue Du, Mong Li Lee, Tok Wang Ling Department of Computer Science School of Computing National University of Singapore {duwenyue, leeml,
Conceptual Modeling for XML Data
COP Introduction to Database Structures
Data Modeling Using the ERD
CS4222 Principles of Database System
ER model Ashima Wadhwa.
University of Milano Bicocca, Italy Carlo Batini
Database EER.
بسم الله الرحمن الرحيم.
Modeling Your Data Chapter 2 cs542
Translation of ER-diagram into Relational Schema
From ER to Relational Model
Entity – Relationship Model
The Entity-Relationship Model
Faloutsos - Pavlo C. Faloutsos - A. Pavlo Lecture#2: E-R diagrams
376a. Database Design Dept. of Computer Science Vassar College
The Entity-Relationship Model
Presentation transcript:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

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

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

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

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

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 +

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#

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.

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#

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

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

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

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

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

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