SupervisorStudent Prof. Atilla ElciHussam Hussein ABUAZAB 046001 June 2007 Using ORACLE XML Parser to Access Ontology CMPE 588 Engineering Semantic for.

Slides:



Advertisements
Similar presentations
CC SQL Utilities.
Advertisements

Copyright © 2011 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. SQL Workshop Day 4.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Chapter 4B: More Advanced PL/SQL Programming
Database Management: Getting Data Together Chapter 14.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
® IBM Software Group © 2006 IBM Corporation The Eclipse Data Perspective and Database Explorer This section describes how to use the Eclipse Data Perspective,
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
A First Program Using C#
6/1/2001 Supplementing Aleph Reports Using The Crystal Reports Web Component Server Presented by Bob Gerrity Head.
JSP Standard Tag Library
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
WorkPlace Pro Utilities.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Databases and LINQ Visual Basic 2010 How to Program 1.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
XSLT for Data Manipulation By: April Fleming. What We Will Cover The What, Why, When, and How of XSLT What tools you will need to get started A sample.
DATABASE and XML Moussa Mané. Learning Objectives ● Learn about Native XML Databases ● Learn about the conversion technology available ● Understand New.
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
SupervisorStudent Dr. Atilla ELÇİHussam Hussein ABUAZAB Assoc. Prof Fall 2007 Ontology-based Support for Human Disease Study CMPE 583 WEB SEMANTICS:
Oracle Application Express (Oracle APEX), formerly called HTML DB, is a Free rapid web application development tool for the Oracle database.
Miscellaneous Excel Combining Excel and Access. – Importing, exporting and linking Parsing and manipulating data. 1.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 34 - Case Study: Active Server Pages and XML Outline 34.1 Introduction 34.2 Setup and Message.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
HTML Concepts and Techniques Fourth Edition Project 12 Creating and Using XML Documents.
Transforming Documents „a how-to of transforming xml documents“ Lecture on Walter Kriha.
1 By: Nour Hilal. Microsoft Access is a database software where data is stored in one or more Tables. A Database is a group of related Tables. Access.
Copyrighted material John Tullis 10/17/2015 page 1 04/15/00 XML Part 3 John Tullis DePaul Instructor
10/17/2012ISC471/HCI571 Isabelle Bichindaritz 1 Technologies Databases.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
INTRODUCTION TO PL/SQL. Class Agenda Introduction Introduction to PL/SQL Declaring PL/SQL Variable Creating the Executable Section Interacting with the.
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Data Management Console Synonym Editor
Oracle Data Integrator Procedures, Advanced Workflows.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
Francesco Rizzo (ISTAT - Italy) SDMX ISTAT FRAMEWORK GENEVE May 2007 OECD SDMX Expert Group.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
ECDL. Word processing Work with documents and save them in different file formats Choose built-in options such as the Help function to enhance productivity.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
© 2006 Altova GmbH. All Rights Reserved. Altova ® Product Line Overview.
Managing Database With Oracle Replacement for Ch10 COP 4708.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
Level 1-2 Trigger Data Base development Current status and overview Myron Campbell, Alexei Varganov, Stephen Miller University of Michigan August 17, 2000.
D Copyright © 2004, Oracle. All rights reserved. Using Oracle XML Developer’s Kit.
XML Schema – XSLT Week 8 Web site:
11 Copyright © 2004, Oracle. All rights reserved. Managing XML Data in an Oracle 10g Database.
Apache Cocoon – XML Publishing Framework 데이터베이스 연구실 박사 1 학기 이 세영.
E Copyright © 2006, Oracle. All rights reserved. Using SQL Developer.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
ASP.NET Programming with C# and SQL Server First Edition
Visual Basic 2010 How to Program
SQL and SQL*Plus Interaction
ISC440: Web Programming 2 Server-side Scripting PHP 3
Using SQL*Plus.
PL/SQL Declaring Variables.
Oracle and XML Mingzhu Wei /7/2019.
Presentation transcript:

SupervisorStudent Prof. Atilla ElciHussam Hussein ABUAZAB June 2007 Using ORACLE XML Parser to Access Ontology CMPE 588 Engineering Semantic for Web Information System TERM PROJECT REPORT

This project addresses the issue of useing protégé to create the ontology of geographic locations, and using the software racer to chick its consistency. Some annotation will be added to ontology and utilized for search process. Then, generate the XML format of the ontology, and load onto ORACLE database, then using ORACLE XML parser for PL/SQL to access the contents of the XML file of the ontology. Finally, XPath expression is used to search the XML documents The results of SQL queries will be transformed into any desired XML format using XSLT stylesheets, and to be browsed by explorer. Goal

and methodologies are largely inadequate because of the inherent autonomous and heterogeneous nature of the information resources which force applications to share data and respective services, often without prior knowledge of their structures functionality. Developing ontology, as a unifying resource, would be of great importance for the researcher to be able to solve this problem. Classical techniques

In this project, I am suggesting some Ontology with four main branches: Address City State Country Continent Fig. 1: Geographic Locations Ontology and its five main sub-ontologies: Address, City, Country, State, and Continent.

We will see that the annotations of the instance will be treated as attributes Case Study Search for the cities annotated Holy cities ==============================================

Why Should I Use XML? 1. XML Enables a Data Web of Information Services. 2. XML Simplifies Application Integration. 3. XML Simplifies Information Publishing and Reuse. Fig. 2. XML and HTTP can connect different applications

Overview of key Oracle technologies for XML

Using the Oracle XML Parser, you can parse XML documents into their infoset, manipulate their contents, and return the modified infoset back into XML format. Using the Oracle XSLT processor, you can transform XML into XML, HTML, or text of another structure. Both the Oracle XML Parser and the Oracle XSLT processor share the common Oracle XPath Engine that enables querying an XML document's infoset to select interesting subsets of its information. The Oracle XML SQL Utility automates the tasks of producing XML from SQL query results and storing XML documents into tables in the database. Oracle interMedia Text enables indexing and querying of XML documents or document fragments, with rich support for leveraging the structure of the XML in the query criteria. These core components are used by more than 40 of Oracle's own internal development teams, so their quality, performance, and conformance to W3C standards are very high.

1. CREATE DIRECTORY xmlfiles AS 'C:\term_project_588\xmlfiles'; 2. Generate XML file format of the ontology and saved in the mentioned directory. 3. Now we're ready to load the document into the database. We have two choices: – Save a handle to the external file in a column of type BFILE (built-in datatype for external files). – Save a copy of the contents of the external file in a column of type CLOB CREATE TABLE xml_documents ( docname VARCHAR2(200) Primary Key, xmldoc CLOB, timestamp DATE);

To store an external XML file into xml_documents table, we are to follow these steps: 1.Insert a new row into xml_documents with an empty CLOB for the xmldoc column. 2.Retrieve the empty CLOB into a variable. 3.Get a BFILE handle to the external file. 4.Open the file for reading. 5.Copy the contents of the file into the CLOB variable. 6.Close the file and COMMIT. I will create a stored procedure, I will call it insertXMLFile, that accepts as arguments the directory name, the filename, and the name you'd like to associate with the document as its primary key. EXEC insertXmlFile('XMLFILES', 'geographic.xml');

CREATE OR REPLACE PROCEDURE insertXmlFile( dir VARCHAR2, file VARCHAR2, name VARCHAR2 := NULL) IS theBFile BFILE; theCLob CLOB; theDocName VARCHAR2(200) := NVL(name,file); BEGIN -- (1) Insert a new row into xml_documents with an empty CLOB, and -- (2) Retrieve the empty CLOB into a variable with RETURNING..INTO INSERT INTO xml_documents(docname,xmldoc) VALUES(theDocName,empty_clob( )) RETURNING xmldoc INTO theCLob; -- (3) Get a BFile handle to the external file theBFile := BFileName(dir,file); -- (4) Open the file dbms_lob.fileOpen(theBFile); -- (5) Copy the contents of the BFile into the empty CLOB dbms_lob.loadFromFile(dest_lob => theCLob, src_lob => theBFile, amount => dbms_lob.getLength(theBFile)); -- (6) Close the file and commit dbms_lob.fileClose(theBFile); COMMIT; END; /

Verifying proper installation of Oracle XML Parser for PL/SQL We can verify proper installation by running the following SQL statement: SELECT SUBSTR(dbms_java.longname(object_name),1,30) AS class, status FROM all_objects WHERE object_type = 'JAVA CLASS' AND object_name dbms_java.shortname('oracle/xml/parser/v2/DOMParser'); We will have the following output: CLASS STATUS oracle/xml/parser/v2/DOMParser VALID

Checking that an XML document is well-formed To do so, we need to go through the following steps: 1. Call xmlparser.newParser to create a new XML Parser for the job. 2. Call one of the following to parse the document: xmlparser.parse, xmlparser.parseBuffer, or xmlparser.parseCLOB. 3. Call xmlparser.freeParser to free the instance of the XML Parser. The following procedure will check. Where I have included these steps in the following procedure:

CREATE OR REPLACE PROCEDURE checkXMLInCLOB(c CLOB, wellFormed OUT BOOLEAN, error OUT VARCHAR2) IS parser xmlparser.Parser; xmldoc xmldom.DOMDocument; XMLParseError EXCEPTION; -- Associate the XMLParseError exception with the error code PRAGMA EXCEPTION_INIT( XMLParseError, ); BEGIN -- (1) Create a new parser parser := xmlparser.newParser; -- (2) Attempt to parse the XML document in the CLOB xmlparser.ParseCLOB(parser,c); -- (3) Free the parser. xmlparser.freeParser(parser); -- If the parse succeeds, we'll get here wellFormed := TRUE; EXCEPTION -- If the parse fails, we'll jump here. WHEN XMLParseError THEN xmlparser.freeParser(parser); wellFormed := FALSE; error := SQLERRM; END; /

SET SERVEROUTPUT ON DECLARE xmlClob CLOB; wellFormed BOOLEAN; parseError VARCHAR2(200); BEGIN -- Select the CLOB for the document named ' geographic.xml ' into a variable SELECT xmldoc INTO xmlClob FROM xml_documents WHERE docname = 'people.owl.xml'; -- Check it for XML Well-formedness checkXMLInCLOB(xmlClob,wellFormed,parseError); -- Print out an error if it was not well-formed. IF NOT wellFormed THEN dbms_output.put_line(parseError); END IF; END; /

1.Protégé 3.2.1, for editing my ontology, I will make use of protégé. Protégé is a free, open source and java based ontology editor. 2.RacerPro Version available at harburg.de/~r.f.moeller/racer/; to automatically compute the classification hierarchy, and also to check the logical consistency of the ontology. Tools

Protégé is an ontology editor and knowledge- based editor, it provides graphical user interface (GUI) that models classes (domain concepts) and their attributes and relationships in ontology. While RacerPro stands for Renamed ABox and Concept Expression Reasoner Professional, as the reasoning system is required as part of the ontology editing system, RacerPro, will run to find out the inconsistency relation or properties that might appear as the marvelous growth of illnesses symptoms ontology. Tools continue

Application

Let us go to the application …