Laboratory of Computer Science LISI National Engineering School
Laboratory of Computer Science LISI National Engineering School for Mechanics and Aerotechnics ENSMA 1, avenue Clément Ader - BP 40109 - 86961 Futuroscope cedex - France An Object-Oriented Based Algebra for Ontologies and their Instances Stéphane JEAN Yamine AIT-AMEUR Guy PIERRA jean@ensma. fr yamine@ensma. fr pierra@ensma. fr ADBIS’ 07, Varna, September 30, 2007
Definition of an Ontology Based Database (OBDB) System Catalog Ontology Content t A Database which contains : v. Local ontologies v. Possibly, links to external ontologies v. Ontology-based data : extensions of ontology concepts v. Links Ontologies / Data 2
Motivation of our work System catalog Logical model Relational Data Model (Relation) Relational Algebra RDB System catalog Logical model OODB System catalog Ontology Content Object-Oriented Data Model (Class, Property, …) Query Algebra : Encore, AQUA, QAL, . . . Useful to study optimization, to prove semantic properties (e. g. completeness, closure) of query languages … Data Model ? Query Algebra ? What about OBDB ? OBDB 3
Outline u Context: OBDB and OBDB Query Languages u Overall Approach u Proposal: Data Model and Query Algebra for OBDB u Conclusion and future work 4
Existing OBDB: diversity of ontology models Context u Approach u Proposal u Conclusion u u OBDB use different ontology models RDF-Schema (RDF-Suite, Sesame, RSTAR, . . . ) System Catalog Ontology Content PLIB (Onto. DB and Onto. DB 2) OWL (DLDB, Onto. MS, …) F-Logic, OWL Flight, KIF, Powerloom, KARIN, Ontolingua, … Objective 1. A data model for OBDB independent of the underlying ontology model 5
Existing OBDB: diversity of representations Context u Approach u Proposal u Conclusion u system catalog t Table of triples (e. g. Jena, 3 Store) system catalog ontology meta-schema ontology content system catalog content t Split ontology/data (e. g. Sesame) v binary or vertical representation for data v fixed ontology model t Ontology Meta-Schema (Onto. DB) v table-like representation for data v evolving ontology model Objective 2. A data model for OBDB independent of the persistence DB logical model 6
Existing Ontology Query languages system catalog Context u Approach u Proposal u Conclusion u SPARQL v RDF Querying system catalog ontology meta-schema ontology content system catalog content RQL v semantics of RDF-S constructors v fixed ontology model Onto. QL v semantics of core ontology model constructors vevolving ontology model Objective 3. Define a reference query _ _ algebra for ontology query languages 7
Outline u Context: OBDBs and OBDBs Query Langages u Overall Approach u Proposal: Data Model and Query Algebra for OBDB u Conclusion and future work 8
Objective 1: Independence from ontology model Context u Approach u Proposal u Conclusion u u Definition of an extendable core ontology model u Storable in the ontology meta-schema part _ _ _ Entities Attributes Ontology Class Property Datatype Restriction _ code _ name _ definition _ super. Classes … _ remark 9
Objective 2: Independence from persistence DB logical model Context u Approach u Proposal u Conclusion u u Each class is associated to an extent whatever is the logical model used to represent it u A view may be associated to represent the extent of a class in order to hide the specific logical model 10
Objective 3: Define a Query algebra for OBDB Context u Approach u Proposal u Conclusion u u Ontologies use extensively object-oriented concepts Class Property Instances u But they have their own particularities t Ontology and/or Data may be queried t Solely a subset of properties are valued t Multi-instanciation t… Proposed solution Adapt and Extend the ENCORE algebra for OODB [Shaw&Zdonik, 1990] 11
Outline u Context: OBDBs and OBDBs Query Langages u Overall Approach u Proposal: Data Model and Query Algebra for OBDB u Conclusion and future work 12
Proposal: formal data model of an OBDB Context u Approach u Proposal u Conclusion u Model M = (E, A, OC, C, P, Extent) Meta-schema: E, A, OC Super. Entities E 2 E Type OC E Att. Domain A E Att. Range A E Val OC A OC Meta Schema Ontology System catalog Content Ontology C, P Super. Classes C 2 c prop. Domain P C prop. Range P C Nomination: C Extent Content: Extent, I Type I 2 Extent Abstraction: Extent C Schema. Prop Extent 2 p Val I P I 13
Formal data model of an OBDB: Example Meta Schema Ontology Context u Approach u Proposal u Conclusion u System catalog Content 14
Query Algebra for OBDB: Ontology part Context u Approach u Proposal u Conclusion u u Signatures of Operators E x 2 OC x … E x 2 OC Collection of ontology elements Ontology elements = Instance of an u Main Operators : Onto. Image, Onto. Project, _ Onto. Select, (Object-Oriented) Onto. OJoin Ontology model _ Onto. Image: E x 2 OC x Function EOperators x 2 OC Same Semantics as OODB Apply a function to a collection of ontology elements T E, Oc 2 OC => Onto. Image(T, Oc, f) = (Att. Range(f), {f(i) | i Oc}) Onto. Select: E x 2 OC x Predicate E x 2 OC Apply a selection to a collection of ontology elements T E, Oc 2 OC => Onto. Select(T, Oc, pred) = (T, {i | i Oc pred(i)}) 15
Query Algebra for OBDB: Example(1) Context u Approach u Proposal u Conclusion u u Query on ontologies Retrieve the URI of the ontology classes named ‘Person’ Onto. QL. SELECT #uri FROM #class WHERE #name = ‘Person’ RQL. SELECT $C FROM $C WHERE label($C) = ‘Person’ SPARQL. SELECT ? C WHERE { ? C rdf: type rdfs: Class. ? C rdfs: label ? n FILTER (? n=‘Person’) } onto. Image onto. Select ext* uri name = ‘Person’ Same Semantics as OODB operators Class 16
Query Algebra for OBDB: Content part Context u Approach u Proposal u Conclusion u u Signatures of operators C x 2 I x … C x 2 I Collection of ontology class instances Case 1: Subset arepart valued u Same Operators as of onproperties the ontology Case 2: Multi-instanciation Onto. Image: C x 2 I x Function C x 2 I The Semantics of the operators Onto. Project: C x 2 I x 2 Function x 2 String C x 2 I needs to be adapted Onto. Select: C x 2 I x Predicate C x 2 I Onto. OJoin: C x 2 I x Predicate C x 2 I 17
Query Algebra for OBDB: Onto. Image Operator Context u Approach u Proposal u Conclusion u u Operator signature Onto. Image: C x 2 I x Function C x 2 I Apply a function (e. g. a property) to a collection of ontology class instances u Operator semantics case 1: Property not used in the extent of a class Onto. Val(i, p) = Val(i, p), if e Type. Of (i) such that p Schema. Prop(e) _ else, UNKNOWN => Onto. Image’(C, Ic, p) = (range(p), {Onto. Val(i) | i Ic} case 2: Multi-instanciation Domain(p) = C 2 => Onto. Image (C 1, Ic 1, p) = Onto. Image’( Onto. OJoin ( C 1, Ic 1 C 2, ext*(C 2), λi. C 1 λi. C 2. ic 1= ic 2 ), Ic 2. p ) 18
Query Algebra for OBDB: Example(2) Context u Approach u Proposal u Conclusion u u Query on data Retrieve the first name of the instances of the ontology class User Onto. QL. SELECT first name FROM User RQL. SELECT fn FROM User{u}. first_name{fn} SPARQL. SELECT ? fn WHERE { ? u rdf: type User OPTIONAL { ? u first_name ? fn } } onto. Image ext* User first_name Case 1: May not be used in the extent of User case 2: May not be defined on User (multi-instanciation) 19
Query Algebra for OBDB: Ontology and Content parts Context u Approach u Proposal u Conclusion u u Signatures of Operators (E C) x 2(E C) x … (E C) x 2(E C) Collection of ontology elements and/or class instances _ and/or class instances u Same Operators with the introduction of the Type. Of function Type. Of: I 2 C Returns the set of classes an instance belongs to Allows to join the ontology and content part of an OBDB 20
Query Algebra for OBDBs: Example (3) Context u Approach u Proposal u Conclusion u u Querying both ontology and data Retrieve the URI of each ontology class and the URI of its instances Onto. QL. SELECT C. #uri, i. uri FROM #Class C, C as i RQL. SELECT $C, i FROM {i; $C} SPARQL. SELECT ? C ? i WHERE { ? C rdf: type rdfs: Class. ? i rdf: type ? C } Onto. Project <C. uri, i. uri> Onto. OJoin ext* C type. Of(i) Join the ontology and content part of an OBDB Class C Object. C i 21
Outline u Context: OBDBs and OBDBs Query Langages u Overall Approach u Proposal: Data Model and Query Algebra for OBDB u Conclusion and future work 22
Context u Approach u Proposal u Conclusion u A formal work on OBDB t Formal Data Model v. Independent of a given ontology model n Core ontology model n Extension capabilities n Can be stored in the Meta-Schema part v. Independent of the logical model n Extent to each class n View mechanism for hiding the logical model t Query Algebra v. Extension and adaptation of the ENCORE query algebra v. Usable to represent the semantics of queries on Ontology and/or data expressed in different languages 23
Context u Approach u Proposal u Conclusion u Future work u Properties of the algebra t Completeness and closure of the algebra t Complexity and benchmarking u Optimization t Adapt and reuse existing techniques t Exploit specific features of OBDB u Expressive power of Ontology Query Language t Extend the notion of relational completeness to OBDB exploitation languages 24
Questions 25
- Slides: 25