Association Relationship Transformation of XML Schemas to Object–Relational Databases Nathalia Devina Widjaya, David Taniar Wenny Rahayu, Eric Pardede.

Slides:



Advertisements
Similar presentations
The transformation of an ER or EER model into a relational model
Advertisements

Chapter 10: Designing Databases
XML DOCUMENTS AND DATABASES
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
Chapter 3 Data Modeling Copyright © 2014 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent.
Accounting System Design
1 Presentation by Irina Kogan. November 27, Presentation by Irina Kogan. November 27, 2000.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 28 Database Systems I The Relational Data Model.
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Databases Revision.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Relational Model Credited to: Juliana Freire. Why Use the Relational Database Model? Extremely useful and simple – Single data-modeling concept: relations.
Entity-Relationship Model and Diagrams (continued)
Data Management Design
IMS1805 Systems Analysis Topic 3: Doing Analysis (continued from previous weeks)
Database Design Language Incorporating Collection Types for Web Database Applications Eric Pardede Wenny Rahayu David Taniar Bandung, 11 September 2002.
Chapter 5 UNDERSTANDING AND DESIGNING ACCOUNTING DATA.
INTRODUCTION TO DATABASE USING MS ACCESS 2013 PART 2 NOVEMBER 4, 2014.
Chapter 13 (Online): Object-Oriented Databases
ระบบฐานข้อมูลขั้นสูง (Advanced Database Systems) Lecturer AJ. Suwan Janin Phone:
ICOM 5016 – Introduction to Database Systems Lecture 4 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
Chapter 4 The Relational Model.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-02,03 Introduction –Data Models Lectured by, Jesmin Akhter.
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Database Systems: Design, Implementation, and Management Ninth Edition
Principles of Database Design, Part II AIMS 2710 R. Nakatsu.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
Concepts and Terminology Introduction to Database.
XML Structures For Existing Databases Ref: 106.ibm.com/developerworks/xml/library/x-struct/
MIS 301 Information Systems in Organizations Dave Salisbury ( )
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Chapter 12: Designing Databases
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Relational Database. Database Management System (DBMS)
EXAMPLE. Subclasses and Superclasses Entity type may have sub-grouping that need to be represented explicitly. –Example: Employee may grouped into.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
Jozef Kuper.  Describe a Database  Entities  Atributes  Relationships.
1 Data Modeling : ER Model…. Lecture Summary so for …. ER Model Entity, Attribute, Key Relationships Instance Diagram.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-03 Introduction –Data Models Lectured by, Jesmin Akhter.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
Ch- 8. Class Diagrams Class diagrams are the most common diagram found in modeling object- oriented systems. Class diagrams are important not only for.
Lection №4 Development of the Relational Databases.
Class Diagrams. Terms and Concepts A class diagram is a diagram that shows a set of classes, interfaces, and collaborations and their relationships.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Chapter 4 The Relational Model Pearson Education © 2009.
Data Models. 2 The Importance of Data Models Data models –Relatively simple representations, usually graphical, of complex real-world data structures.
1 © 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from the.
Lecture 5 Data Model Design Jeffery S. Horsburgh Hydroinformatics Fall 2012 This work was funded by National Science Foundation Grant EPS
1 CS122A: Introduction to Data Management Lecture #4 (E-R  Relational Translation) Instructor: Chen Li.
Data Resource Management Data Concepts Database Management Types of Databases Chapter 5 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
Data Modeling Using the Entity- Relationship (ER) Model
Data Modeling Using the ERD
XML: Extensible Markup Language
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
The Relational Model Transparencies
Presentation transcript:

Association Relationship Transformation of XML Schemas to Object–Relational Databases Nathalia Devina Widjaya, David Taniar Wenny Rahayu, Eric Pardede Bandung, 11 September 2002

Structure of Presentation Background Background Objectives Objectives Association Relationship Association Relationship Related Work Related Work Proposed Transformation Methodology Proposed Transformation Methodology Conclusion and Future Work Conclusion and Future Work

Background The popularity of XML is growing and is gradually accepted as the standard for describing and interchanging data between various systems and databases on the Internet The popularity of XML is growing and is gradually accepted as the standard for describing and interchanging data between various systems and databases on the Internet XML now offers XML Schema definition language as a substitution of DTD. It provides richer facilities for defining and constraining the content of XML documents XML now offers XML Schema definition language as a substitution of DTD. It provides richer facilities for defining and constraining the content of XML documents With the wide acceptance of the OO conceptual models, more systems are modeled and expressed with OO notation. This situation suggests the necessity to integrate the OO conceptual models and XML. With the wide acceptance of the OO conceptual models, more systems are modeled and expressed with OO notation. This situation suggests the necessity to integrate the OO conceptual models and XML.

Objectives The goal of this work is to present a coherent way to transform the XML schema into ORDB using Oracle 9i features models The goal of this work is to present a coherent way to transform the XML schema into ORDB using Oracle 9i features models This transformation is important so that all the data that are created using XML schema can be transformed to the database using Oracle format and features, without eliminating the object relational features This transformation is important so that all the data that are created using XML schema can be transformed to the database using Oracle format and features, without eliminating the object relational features

Objectives (2) The emphasis of this paper is on the transformation of association relationship to help people conveniently generate Oracle database The emphasis of this paper is on the transformation of association relationship to help people conveniently generate Oracle database The work presented in this paper is actually part of a larger research project on Transformation from XML Schema to Object- Relational Databases. The work presented in this paper is actually part of a larger research project on Transformation from XML Schema to Object- Relational Databases. (i) transformation of aggregation and inheritance relationship from XML Schema to ORDB (ii) transformation of association relationship from XML Schema to ORDB

Association Relationship ORDB was introduced to improve RDB performance and has become popular because it improves the limitations of RDB such as lack of support for new types and composite data values ORDB was introduced to improve RDB performance and has become popular because it improves the limitations of RDB such as lack of support for new types and composite data values Since ORDB has OO features, it encapsulates the static (including association relationship) as well as dynamic aspects of objects Since ORDB has OO features, it encapsulates the static (including association relationship) as well as dynamic aspects of objects The association relationship represents a “connection” between object instances. Basically, it is a reference from one object to another that provides access paths among objects in a system. The association relationship represents a “connection” between object instances. Basically, it is a reference from one object to another that provides access paths among objects in a system. The objects are connected through an association link. The link can have a specified cardinality: one-to-one, one-to-many, many-to- many The objects are connected through an association link. The link can have a specified cardinality: one-to-one, one-to-many, many-to- many

Related Work Most existing work has focused on methods to map RDB to an XML database for database interoperability. Some works still used DTD and some have used XML schema. Most existing work has focused on methods to map RDB to an XML database for database interoperability. Some works still used DTD and some have used XML schema. The previous works include mapping referential integrity constraints from RDB to XML, semantic data modeling using XML schemas, hybrid database schema to map a subset of XML documents onto database structures, generic-transforming rules from the OOCM to XML schema, etc. The previous works include mapping referential integrity constraints from RDB to XML, semantic data modeling using XML schemas, hybrid database schema to map a subset of XML documents onto database structures, generic-transforming rules from the OOCM to XML schema, etc. The transformation of generalization and aggregation relationship from the XML Schema to ORDB has been done earlier as a first part of the project The transformation of generalization and aggregation relationship from the XML Schema to ORDB has been done earlier as a first part of the project

Proposed Transformation Methodology There are 3 parts of association relationships that will be transformed, one-to-one association, one-to-many association and many-to-many association There are 3 parts of association relationships that will be transformed, one-to-one association, one-to-many association and many-to-many association The method that we use to implement the association relationship in Oracle is using object references (REF). Instead of connecting two tables through the values of the associated primary key and foreign key, this method allows one to directly connecting two tables through referencing attribute The method that we use to implement the association relationship in Oracle is using object references (REF). Instead of connecting two tables through the values of the associated primary key and foreign key, this method allows one to directly connecting two tables through referencing attribute

One-to-One Relationship The example that is used in this section is the relationship between lecturer and office The example that is used in this section is the relationship between lecturer and office For one-to-one association relationship, it is important to determine the participation of the objects to decide location of the foreign keys in relational system For one-to-one association relationship, it is important to determine the participation of the objects to decide location of the foreign keys in relational system HAS11

One-to-One Relationship (2) The Transformation steps: The Transformation steps: 1.From the XML Schema, element with partial participation will be recognized by statement minOccurs =”0” maxOccurs =”1”. First, create an object for the one with partial participation (office) with its attributes …<complexType><sequence> </sequence>…

One-to-One Relationship (3) …</element> </element>… CREATE OR REPLACE TYPE Office_T AS OBJECT (office_idVARCHAR2(10)); (office_idVARCHAR2(10));

One-to-One Relationship (4) 2.Create another object for the one with total participation, lecture, with the attributes and a REF that refers to office type … … … CREATE OR REPLACE TYPE Lecture_T AS OBJECT (lecture_idVARCHAR2 (10), (lecture_idVARCHAR2 (10), lecture_nameVARCHAR2 (50), lecture_nameVARCHAR2 (50), lecture_officeREF office_T) lecture_officeREF office_T)

One-to-One Relationship (5) 3.Lastly, we create one table for ‘Lecture’ and another one for ‘Office’. Each table has its id as well as the constraints CREATE TABLE Office OF Office_T (office_id NOT NULL, (office_id NOT NULL, PRIMARY KEY (office_id)); PRIMARY KEY (office_id)); CREATE TABLE Lecture OF Lecture_T (lecture_id NOT NULL, (lecture_id NOT NULL, PRIMARY KEY (lecture_id)); PRIMARY KEY (lecture_id));

One-to-Many Relationship The example that is used in this section is the relationship between customer and order The example that is used in this section is the relationship between customer and order HAS1*

One-to-Many Relationship (2) The Transformation steps: The Transformation steps: 1.An element with a complex type in XML Schema, which does not have reference inside it, is transformed by creating an object in ORDB with all the attributes … …</xs:complexType>

One-to-Many Relationship (3) <xs:attribute name = “shippingPostalCode” type=”xs:integer”/></xs:complexType>… CREATE OR REPLACE TYPE Customer_T AS OBJECT (customer_idVARCHAR2 (10), (customer_idVARCHAR2 (10), customer_nameVARCHAR2 (50), customer_nameVARCHAR2 (50), shipping_addressVARCHAR2 (100), shipping_addressVARCHAR2 (100), shipping_cityVARCHAR2 (20), shipping_cityVARCHAR2 (20), shipping_stateVARCHAR2 (20), shipping_stateVARCHAR2 (20), shipping_postalcodeNUMBER) shipping_postalcodeNUMBER)

One-to-Many Relationship (4) 2.For another element in the complex type that has reference to another element, create another object and write all the attributes. The minOccurs = “1” and maxOccurs = “unbounded” in XML will be shown by using REF in Oracle …<xs:sequence> <xs:element name = “order” type= “ orderType” minOccurs= “1” max Occurs = “unbounded” / > … …

One-to-Many Relationship (5) … </xs:complexType> CREATE OR REPLACE TYPE Order_T AS OBJECT (order_idVARCHAR2(10), (order_idVARCHAR2(10), order_dateDATE, order_dateDATE, order_customer REF Customer_T) order_customer REF Customer_T)

One-to-Many Relationship (6) 3.Lastly, create a table for each type. Each table has its id as well as the constraints CREATE TABLE Customer OF Customer_T (customer_id NOT NULL, (customer_id NOT NULL, PRIMARY KEY (customer_id)); PRIMARY KEY (customer_id)); CREATE TABLE Order OF Order_T (order_id NOTNULL, (order_id NOTNULL, PRIMARY KEY (order_id)); PRIMARY KEY (order_id));

Many-to-Many Relationship The example that is used is the relationship between student and course The example that is used is the relationship between student and course ENROLLS_IN**

Many-to-Many Relationship (2) The Transformation steps: The Transformation steps: 1.All elements name that has minOccurs = “1” max Occurs = “unbounded” need to be created as object in ORDB and write all its attributes … … …

Many-to-Many Relationship (3) … … … … CREATE OR REPLACE TYPE Student_T AS Object (student_idVARCHAR2 (10), (student_idVARCHAR2 (10), student_nameVARCHAR2(30)) student_nameVARCHAR2(30)) CREATE OR REPLACE TYPE Course_T AS Object (course_idVARCHAR2(10), (course_idVARCHAR2(10), course_nameVARCHAR2(30)) course_nameVARCHAR2(30))

Many-to-Many Relationship (4) 2.In the XML Schema, each element will be linked to another element by using the attribute name that refers to another element ID. For those elements create table for each of them in ORDB and add the constraints for the attributes … … …… CREATE TABLE Student OF Student_T (student_idNOT NULL, (student_idNOT NULL, PRIMARY KEY(student_id)); PRIMARY KEY(student_id)); CREATE TABLE Course OF Course_T (course_idNOT NULL, (course_idNOT NULL, PRIMARY KEY (order_id)); PRIMARY KEY (order_id));

Many-to-Many Relationship (5) 3.Create another table to keep the relationship between the two connected tables in ORDB. This table will have reference to the participating objects CREATE TABLE Enrolls_in (studentREF Student_T, (studentREF Student_T, courseREF Course_T); courseREF Course_T);

Conclusion and Future Work In this paper, we have investigated the transformation from XML schema to the ORDB by using Oracle 9i, emphasis the transformation of association relationship In this paper, we have investigated the transformation from XML schema to the ORDB by using Oracle 9i, emphasis the transformation of association relationship This transformation is important because people tends to eliminate the object-oriented conceptual features when they transform XML schema to the database. This transformation is important because people tends to eliminate the object-oriented conceptual features when they transform XML schema to the database. Our future work is being planned to investigate more transformation from XML schema to ORDB for other XML Schema features that has not been discussed in this paper. Further research should be done to create a query from XML schema to get the data from the Oracle 9i databases Our future work is being planned to investigate more transformation from XML schema to ORDB for other XML Schema features that has not been discussed in this paper. Further research should be done to create a query from XML schema to get the data from the Oracle 9i databases