1 / 17

Database Project Group 7

Database Project Group 7. Done by: Zhong Liang Sarah Ong Janice Chow Francis Pang. TOPICS. Introduction Implementation Limitation of system Conclusion . INTRODUCTION. XML is gaining popularity Increasing demand for the use of XML databases

biana
Download Presentation

Database Project Group 7

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. Database Project Group 7 Done by: Zhong Liang Sarah Ong Janice Chow Francis Pang

  2. TOPICS • Introduction • Implementation • Limitation of system • Conclusion

  3. INTRODUCTION • XML is gaining popularity • Increasing demand for the use of XML databases • Need for converting relational databases to XML databases and schemas. • CASE tool to translate relational databases into XML databases.

  4. IMPLEMENTATION • Use the ORA-SS model in our implementation. • Implemented in Java • Store our database using MySQL. Steps to implementation: • Relational Database (RDB) To Entity-Relationship Diagram (ERD) • ERD TO ORA-SS • ORA-SS TO XML Schema and Data

  5. Step 1 : Relational Database (RDB) To Entity-Relationship Diagram (ERD)

  6. Step 1 : Relational Database (RDB) To Entity-Relationship Diagram (ERD)

  7. Demo : RDB CREATE TABLE Person( PersonNumber INT NOT NULL PRIMARY KEY, PersonName VARCHAR(255)) CREATE TABLE House( PostalCode CHAR(6) NOT NULL PRIMARY KEY, HouseType VARCHAR(255) NOT NULL) CREATE TABLE Livein( PostalCode CHAR(6) NOT NULL, PersonNumber INTNOT NULL, Rental INT, RelationshipWithOwner VARCHAR(255), PRIMARY KEY (PostalCode, PersonNumber), FOREIGN KEY (PostalCode) REFERENCES House(PostalCode), FOREIGN KEY (PersonNumber) REFERENCES Person(PersonNumber)) CREATE TABLE Pet ( PetNumber VARCHAR(2) NOT NULL, PetDied BOOLEAN, PRIMARY KEY (PetNumber)) CREATE TABLE Own( PostalCode CHAR(6) NOT NULL, PersonNumber INT NOT NULL, SinceWhen DATE, TitleDeedNumber VARCHAR(255) NOT NULL, PRIMARY KEY (PostalCode, PersonNumber), FOREIGN KEY (PostalCode) REFERENCES House(PostalCode), FOREIGN KEY (PersonNumber) REFERENCES Person(PersonNumber)) CREATE TABLE Takecare( PersonNumber INT NOT NULL, PetNumber VARCHAR(2) NOT NULL, PRIMARY KEY (PersonNumber, PetNumber), FOREIGN KEY (PersonNumber) REFERENCES Person(PersonNumber), FOREIGN KEY (PetNumber) REFERENCES Pet(PetNumber));

  8. Demo : ERD

  9. Cycle • We assume that a cycle always takes one of these forms:

  10. Step 2 : ERD TO ORA-SS • Start from a user specified root node, then traverse ERD to construct a hierachical model

  11. Step 2 : ERD TO ORASS Price Price * Price is an attribute of SPJ

  12. Demo: ORA-SS

  13. Step 3 : ORASS TO XML Schema and Data Results From Demo

  14. Assumption • A foreign key must be referenced to a primary key. • The database given should be at least in 1NF • The user does not input an empty database • The database has relations which are interconnected through foreign keys

  15. Summary of Features Besides the basic entities and relationships, our translator is able to handle the following scenarios: • ERD with cycle • N-ary relationship • Weak entity constraint • Multi-valued attribute

  16. LIMITATION OF SYSTEM • Recursive Relationships • ISA Relationship • Aggregation

  17. Thank you 

More Related