Object Persistence within Information Systems, How ...

3 downloads 384 Views 731KB Size Report
Jun 14, 2007 - Using RDMS to store objects. Available engines. MySQL. 12 / 17 ... drivers. It separates the developer from the specifics of the. RDBMS engine.
Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Object Persistence within Information Systems, How Relational Databases and Data Access Frameworks Interoperate with Ontology Based Portals Jose H. Garcia, Peter Fox and Patrick West NCAR/High Altitude Observatory (HAO)

June 14, 2007

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

1

Introduction

2

Ontologies

3

Tools to handle Ontologies

4

Generating code from ontologies

5

Using RDMS to store objects

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Why is this relevant? Virtual Observatories handle large databases Each database represented by an ontology must handle large quantities of objects. Fast instantiation and retrieval of objects is of paramount importance.

2 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Why is this relevant? Virtual Observatories handle large databases Each database represented by an ontology must handle large quantities of objects. Fast instantiation and retrieval of objects is of paramount importance. Why using Relational Databases? Relational Databases highly optimized engines are the fastest way to retrieve information in large repositories. With a careful design, it is possible to bridge an Object Oriented design crafted from an ontology with Relational Database engines.

2 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Outline In this presentation we will cover Ontologies

Ontologies Definition. Representation.

3 / 17

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Outline In this presentation we will cover Ontologies Tools to handle Ontologies.

Tools to handle Ontologies. Protege and Swoop.

3 / 17

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Outline In this presentation we will cover Ontologies Tools to handle Ontologies. Generating code from ontologies.

Generating code from ontologies Automatic and manual generation.

3 / 17

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Outline In this presentation we will cover Ontologies Tools to handle Ontologies. Generating code from ontologies. Using RDMS to store objects.

Using RDMS to store objects. Using ODBC or specialized packages like Hibernate.

3 / 17

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

1

Introduction

2

Ontologies

3

Tools to handle Ontologies

4

Generating code from ontologies

5

Using RDMS to store objects

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Definition From Wikipedia In both computer science and information science, an ontology is a data model that represents a domain and is used to reason about the objects in that domain and the relations between them. (http://en.wikipedia.org/wiki/Ontology %28computer science%29)

4 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Definition From Wikipedia In both computer science and information science, an ontology is a data model that represents a domain and is used to reason about the objects in that domain and the relations between them. (http://en.wikipedia.org/wiki/Ontology %28computer science%29) From philosophy An explicit formal specification of how to represent the objects, concepts and other entities that are assumed to exist in some area of interest and the relationships that hold among them. (The Free c 1993 Denis Howe) On-line Dictionary of Computing,

4 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Representation

There are few alternatives for representing ontologies. Within the context of the WWW, the Web Ontology Language (OWL) is the dominant resource. OWL extends the Resource Description Framework (RDF) by providing additional vocabulary along with a formal semantics. Another alternative is the Open Knowledge Base Connectivity (OKBC) which is an application programming interface for accessing knowledge bases stored in knowledge representation systems (KRSs).

5 / 17

Introduction

6 / 17

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

1

Introduction

2

Ontologies

3

Tools to handle Ontologies

4

Generating code from ontologies

5

Using RDMS to store objects

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Available Tools Swoop SWOOP is a tool for creating, editing, and debugging OWL ontologies. It was produced by the MIND lab at University of Maryland, College Park, but is now an open source project with contributers from all over. (http://code.google.com/p/swoop/)

7 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Available Tools Swoop SWOOP is a tool for creating, editing, and debugging OWL ontologies. It was produced by the MIND lab at University of Maryland, College Park, but is now an open source project with contributers from all over. (http://code.google.com/p/swoop/) Protege Prot´eg´e is a free, open source ontology editor and knowledge-base framework. The Prot´eg´e platform supports two main ways of modeling ontologies via the Prot´eg´e-Frames and Prot´eg´e-OWL editors. Prot´eg´e ontologies can be exported into a variety of formats including RDF(S), OWL, and XML Schema. (http://protege.stanford.edu/) 7 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

This is the same ontology we previously saw in Emacs

8 / 17

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

1

Introduction

2

Ontologies

3

Tools to handle Ontologies

4

Generating code from ontologies

5

Using RDMS to store objects

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Fundamental Concept The fundamental mechanism for defining concepts within an ontology is the class. In order to define the set of classes in the ontology, one must follow a process of formal analysis and specification. In general, a class contains a set of properties that capture the nature of the concept encapsulated in the class. Properties in themselves can be seen as classes and as such, they take values from their realm of operation. A single set of values assigned to the properties of a class creates a unique instance of the class, which is defined as an object or individual.

9 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Objects that are used commonly or are required to have long lives are stored directly in the ontology file encoded in the OWL Web Ontology Languages. Classes that are regularly instantiated in large quantities can be designed to obtain object’s properties from SQL engines. Frameworks facilitate standard access to objects stored in SQL engines.

10 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Automatic Protege, has a very handy tool to generate code from the ontology. This automatic generating process facilitates the deployment of working environments using the ontology.

11 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Automatic Protege, has a very handy tool to generate code from the ontology. This automatic generating process facilitates the deployment of working environments using the ontology. Manual code This method for generation is more demanding but by using OO languages you can quickly map your ontology to your source code. This approach is specially important if you are using UML class diagrams, since automatic code generation does not work well synchronizing with UML.

11 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

1

Introduction

2

Ontologies

3

Tools to handle Ontologies

4

Generating code from ontologies

5

Using RDMS to store objects

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Available engines

MySQL

12 / 17

Generating code from ontologies

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Available engines

MySQL PostgreSQL

12 / 17

Generating code from ontologies

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Available engines

MySQL PostgreSQL Microsoft SQL server.

12 / 17

Generating code from ontologies

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Available engines

MySQL PostgreSQL Microsoft SQL server. Oracle.

12 / 17

Generating code from ontologies

Using RDMS to store objects

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

So I have the RDMS and the code for the Ontology, what is next? ODBC Most vendors provide Open DataBase Connectivity (ODBC) drivers. It separates the developer from the specifics of the RDBMS engine.

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

So I have the RDMS and the code for the Ontology, what is next? ODBC Most vendors provide Open DataBase Connectivity (ODBC) drivers. It separates the developer from the specifics of the RDBMS engine. RDBMS specific API Developers can use the specific API provided by the vendor. These come in C++, C and Java. Python and Perl have modules to access those but under the hood is generally the same C code.

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

So I have the RDMS and the code for the Ontology, what is next? ODBC Most vendors provide Open DataBase Connectivity (ODBC) drivers. It separates the developer from the specifics of the RDBMS engine. RDBMS specific API Developers can use the specific API provided by the vendor. These come in C++, C and Java. Python and Perl have modules to access those but under the hood is generally the same C code. specialized packages It is possible to use higher level packages like Hibernate, which let you develop classes which inheret the persistence layer in an abstract fashion, facilitating the store and retreival of objects.

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

Example Here is an example from VSTO, to instantiate an specific object from a MySQL database.

14 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

The final step

The SQL schema may or may not reflect the Ontology. Most likely, the SQL schema will have indexes, keys and other database specifics for performance. Futhermore, the process of database normalization may break tables that reflect classes into tables to match the requirements of normal Forms. For most cases, up to third normal form will suffice.

15 / 17

Introduction

Ontologies

Tools to handle Ontologies

Generating code from ontologies

Using RDMS to store objects

The VSTO portal as an implementation of this architecture

16 / 17

Introduction

Ontologies

Tools to handle Ontologies

Thanks!

Questions?

17 / 17

Generating code from ontologies

Using RDMS to store objects