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 Querying Ontology Based Databases Using Onto. QL (an Ontology Query Language) Stéphane JEAN Yamine AIT-AMEUR Guy PIERRA jean@ensma. fr yamine@ensma. fr pierra@ensma. fr ODBASE’ 06, Montpellier, Oct 31 -Nov 2, 2006
Context Ontology: our point of view t Grubber’s definition Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL ‘an explicit specification of a conceptualisation’ t Our understanding of domain ontologies ‘a formal and consensual dictionary of categories and properties of entities of a domain and the relationships that hold among them’ t Three criteria » Formal (Logic, Operational, … based semantics) » Consensual (agreement within a community) » Referencable (URI, BSU, …) t Classification [Webist 06] » Conceptual, canonical/non canonical/linguistic t Several application domains in engineering n Examples (available at http: //plib. ensma. fr)[ISO 13584] » Electronic, petrolium, IMA, Mechanics, Measuring instruments, etc. » Applications to B 2 B and E-Engineering [IJPLM 2006] 2
Context: Ontology Based Databases Meta-Schema Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL t The ONTODB Model [ISI 2005, ODBASE 2006] System Catalog E, A Ontology C, P Class and property descriptors and relationships Logical model (propi, valuej) Extent, Instances 3
Context: Ontology Based Databases Meta-Schema Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL t The ONTODB Model [ISI 2005, ODBASE 2006] E, A System Catalog ENTITY Supertype Name class property ATTRIBUTE Domain Name class name class description properties class TABLE Name Entity Attribut Class Range Multilingual String TRUE Property [ ] Multilingual Ontology Logical model Class_person prop_names : ARRAY prop_age : int prop_adress : REF(Class_Address) Class_Student prop_grade : String Class_Employee prop_salary : int C, P Class and property descriptors and relationships Id table_person Prop_names prop_address table_employee Id Prop_address prop_salary (propi, valuej) Extent, Instances 4
u An exploitation language for ontological data with a database perspective (OBDSs) Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL Aim of our work t Ontology v. Independent of the set up ontology model v. Exploiting the linguistic layer of an ontology t Data v. Data structured by schema (semantic integration) v. Data referenced by URI (Semantic Web) u Satisfaction of database languages requirements v. Completeness and Closure v. Efficiency v. Concurrency, Access control 5
Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL Outline u Context u Enriching Databases with ontologies u The Onto. QL proposal u Comparison with Semantic Web Query Languages u Conclusion and future work 6
From SQL to Onto QL RDB MS u Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u Model u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion u Example system catalog table_person Col_Id col_name col_age logical model table_Address Col_Id u Language t Relational Algebra (RA) t Properties of RA v Completeness, closure col_address Col_street Col_city SELECT a. col_city, avg(p. col_age) FROM table_person p, table_address a WHERE p. col_address = a. col_id AND p. col_name LIKE 'J%' GROUP BY a. col_city ORDER BY a. col_city DESC 7
From SQL to Onto QL ORD BMS u Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 u u Example u Model Querying Ontology Based Databases Using Onto. QL u Context Enriching DBs … Onto. QL proposal Related Work Conclusion v. All properties are valued. Class_person prop_names : ARRAY prop_age : int prop_adress : REF(Class_Address) Extent table_person Id prop_names prop_address system catalog logical model Extent Class_Student Class_Employee prop_salary : int Class_Address v UDT, collection, method t Properties of ERA v Completeness, closure prop_age prop_address prop_grade table_employee Extent prop_street : String prop_city : String t Extended Relational Algebra (ERA) prop_names prop_grade : String Id u Language table_student Id prop_names prop_address prop_salary table_Address Extent Id prop_street prop_city SELECT p. prop_address->prop_city, avg(p. prop_age) FROM ONLY table_person p WHERE p. prop_names[1] LIKE 'J%' GROUP BY p. prop_address. prop_city ORDER BY p. prop_address. prop_city DESC 8
u From SQL to Onto. QL OBDBs Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u u u Namespace = ‘http: //lisi. ensma. fr’ Name. EN = ‘Person’ Name. FR = ‘Personne’ Description. EN = ‘A Human. Being” u Example u Model u Context Enriching DBs … Onto. QL proposal Related Work Conclusion Class_person prop_names : ARRAY prop_age : int prop_adress : REF(Class_Address) Extent Class_Student Class_Employee prop_salary : int table_person Id Extent t Extended Algebra (Onto. Algebra) v namespace, multilingual, unused properties t Properties of Onto. Algebra v Completeness, closure Id prop_address table_student prop_names prop_age prop_address prop_grade : String table_employee Extent u Language prop_names Id Class_Address prop_street : String prop_city : String prop_names prop_address prop_salary table_Address Extent Id prop_street prop_city SELECT city, age FROM ONLY ns_lisi: Person p WHERE p. names[1] LIKE 'J%' GROUP BY p. address. city ORDER BY p. address DESC USING ns_lisi = 'http: //www. lisi. ensma. fr' 9
u From SQL to Onto. QL OBDBs Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u u u Namespace = ‘http: //lisi. ensma. fr’ Name. EN = ‘Person’ Name. FR = ‘Personne’ Description. EN = ‘A Human. Being” u Example u Model u Context Enriching DBs … Onto. QL proposal Related Work Conclusion Class_person prop_names : ARRAY prop_age : int prop_adress : REF(Class_Address) Extent Class_Student Class_Employee prop_salary : int table_person Id Extent t Extended Algebra (Onto. Algebra) v namespace, multilingual, unused properties t Properties of Onto. Algebra v Completeness, closure Id prop_address table_student prop_names prop_age prop_address prop_grade : String table_employee Extent u Language prop_names Id Class_Address prop_street : String prop_city : String prop_names prop_address prop_salary table_Address Extent Id prop_street prop_city SELECT ville, age FROM ONLY ns_lisi: Personne p WHERE p. noms[1] LIKE 'J%' GROUP BY p. adresse. ville ORDER BY p. adresse DESC USING ns_lisi = 'http: //www. lisi. ensma. fr' 10
Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL Outline u Context u Enriching Databases with ontologies u The Onto. QL proposal u Comparison with Semantic Web Query Languages u Conclusion and future work 11
u The Onto. QL Proposal: Definition of the requirements Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL n Data manipulation language » E, A: ontology model manipulation » C, P: ontology manipulation » Extent: content manipulation n Data Query language » » u u u ENTITY Supertype Name class property ATTRIBUTE Domain Name class name class description properties class remark Extent: SQL compatible C, P: Content Querying E/A: Ontology querying content <-> Ontology Model u Context Enriching DBs … Onto. QL proposal Related Work Conclusion TABLE Name Entity Attribut Class Range Multilingual String TRUE Property [ ] Multilingual String TRUE Class_person prop_names : ARRAY prop_age : int prop_adress : REF(Class_Address) Class_Student prop_grade : String Id table_person Prop_names prop_address table_employee Id Prop_address prop_salary Class_Employee prop_salary : int M = (E, A, OC, C, P, Extent) Meta-schema : E, A, OC Super. Entities E 2 E Type. Of OC E Att. Domain A E Att. Range A E Val OC A Oc Ontology C, P Content: Extent, I Super. Classes C 2 c Type. Of I Extent prop. Domain P C Schema. Prop Extent 2 p prop. Range P C Val I P I 12
The Onto QL prop osal Data Mod el and DDL u u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u Ontology Part for defining ontologies C _ _ Class_Person Class_Employee Class_Address Class_Student P _ _ _ prop_names prop_ages prop_address prop_salary prop_grade CREATE #CLASS Class_Student UNDER Class_Person ( DESCRIPTOR ( #name[en] = ‘Student’, #name[fr] =‘Etudiant’, #definition[en]= ‘a learner’ ) PROPERTIES ( prop_grade STRING ) ) u Possibility to extend the ontology part _ _ _ E A Ontology Class Property Datatype Restriction _ code _ name _ definition _ super. Classes … _ remark ALTER ENTITY #CLASS ADD ATTRIBUTE #Remark MULTILINGUAL STRING CREATE ENTITY #Restriction UNDER #CLASS 13
The Onto. QL proposal Data Model and DML u u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u Content Part for instances Class_person table_person Extent Id 1 names : ARRAY age : int address : REF(Class_Address) prop_names prop_address {steve, John, Henry} 1 table_student Extent Class_Student Class_Employee Id prop_names 3 {Joe, Jim} prop_age 18 prop_ address 2 prop_grade : String prop_salary : int Class_Address prop_street : String prop_city : String CREATE EXTENT OF Student ( names, age, address ) table_employee Extent Id prop_names prop_address prop_salary 2 {Georges} 3 12000 table_Address Extent Id Prop_Street Prop_city 2 Sunset Los Angeles 2 Road street Miami 3 Scholar street New York INSERT INTO Student (names, age, address) VALUES ( ARRAY[‘Joe’, ‘Jim’], 18, (SELECT oid FROM Class_Address WHERE street = ‘Road Street’ and city = ‘Miami’) ) 14
The Onto. QL proposal Query Language u u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion u On the content (instances) part Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL SET REFERENCE_LANGUAGE ENGLISH SET NAMESPACE ‘http: //www. lisi. ensma. fr’ Polymorphism SELECT p. names FROM ONLY Person p Path Expression SELECT p. address->city FROM Person p Dependent Collection Nested query Boolean Operators SELECT “first name”, lname FROM Person p, UNNEST (p. “last names”) as lname SELECT p. names, ARRAY (SELECT a. street FROM Address a WHERE a. city = p. address->city) as streets FROM Person p (SELECT p. oid FROM Person p) EXCEPT (SELECT s. oid FROM Student s) Aggregate Operators SELECT avg(age) FROM Student s WHERE s. address->city = ‘Los Angeles’ Quantifier Operators SELECT a. city FROM Address a WHERE EXIST (SELECT s. names FROM Student s WHERE s. address->city = a. city AND s. age > 35) v. Compatibility is kept n The user needs to know the logical model (table names) 15
u The Onto. QL proposal Query Language u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u On the ontology (concepts) part t Same syntax as content query with # as prefix t + Multilingual attribute SELECT c. #name[fr], c. #description[en], p. #name[en], FROM #CLASS c, UNNEST (c. #properties) p WHERE #name[en] = ‘Person’ Name_FR Description_EN Name_EN Personne ‘Human Being’ names Personne ‘Human Being’ age Personne ‘Human Being’ address t + Built-in Attributes SELECT c. #sub. Classes c. #all. Sub. Classes c. #scope. Properties c. #properties c. #used. Properties FROM #CLASS c Classes Class_person Sub. Classes { Class_Employee, Class_Student } Class_employee {} Class_Student …. all. Sub. Classes properties { Class_Employee, Class_Student, Class_Working. Student } { prop_names, prop_age, prop_address } {} …. { prop_names, prop_age, prop_address, prop_salary } …. used. Properties { prop_names, prop_address } { prop_names, prop_address, prop_salary } …. t Possibility to use other attributes by altering A 16
u The Onto. QL proposal DQL u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion t From Ontology to content Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u On both ontology and content parts v. Encapsulation of logical model/hiding table names SELECT i. oid, p. #name[en], i. p FROM C in #CLASS , C as i, UNNEST (C. #properties) as p WHERE C. #name[en] like ‘Per%’ C as i t. From Content to ontology SELECT type. Of(p). #name[fr] FROM Person p type. Of 17
Formal semantics of Onto. QL: Onto. Algebra u u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion u Operator’s signatures Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL t (E C) x 2(OC I) x … --> (E C) x 2(OC I) u Main Operators t Onto. Image, Onto. Project, Onto. Select, Onto. OJoin v Onto. Select: (E C) x 2(OC I) x Predicat --> (E C) x 2(OC I) v T E C, Oc 2 Oc => Onto. Select(T, Oc, pred) = {i | i Oc pred(i)} onto. Image SELECT #name[fr] onto. Select FROM #class WHERE #name[en] = ‘Person’ ext* #name(fr) #name(en) = ‘Person’ #class u Adapted from the ENCORE algebra [Shaw&Zdonik, 1990] 18
The Onto. QL proposal Implementation u u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL Architecture Onto. QL+ JOBDBC Onto. QBE Onto. API Entity. Class c = new Entity. Class(‘CPerson’); c. get. Name(‘fr’); Onto. QLResult. Set rs = stmt. execute. Query( ‘SELECT c. #name[fr] FROM #CLASS’ WHERE c. #name[en] = ‘Person’) 19
Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL Outline u Context u Enriching Databases with ontologies u The Onto. QL proposal u Comparison with Semantic Web Query Languages u Conclusion and future work 20
u Comparison u u Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u Onto. QL t t Context Enriching DBs … Onto. QL proposal Related Work Conclusion u RQL SQL compatible Direct Content manipulation Linguistic definitions Independent w. r. t ontology model t No explicit class queries SELECT I, T FROM {I}. title{T} t Multi-instanciation SELECT I, T FROM Person{I}. title{T} DELETE FROM Person u Spar. QL t dedicated for RDF 21
u Comparison u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u SPARQL family t regard RDF as triple data without schema or ontology information u RQL family and Onto. QL t t Support of Data, schema and fixed meta-schema no cycle in subsumption relationship properties have domain and range support of combining data and schema querying u Onto. QL t Support of dynamic meta-schema t support of combining data, schema and metaschema querying t In case of Relational OBDB v Upward compatibility RDBs and ORDBs u Importance of the chosen OBDB architecture 22
Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL Outline u Context u Enriching Databases with ontologies u The Onto. QL proposal u Comparison with Semantic Web Query Languages u Conclusion and future work 23
u Conclusion u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u A full database language v. Extension of SQL n Easy to learn n Powerful n Completeness, closure n Can be implemented as an extension of existing RODBMS v. Independence from any specific n Ontology model n OBDB model (view mechanism at content level) v. Exploitation of both n Conceptual definitions and n Linguistic definitions associated to ontology concepts 24
u Future work u u Context Enriching DBs … Onto. QL proposal Related Work Conclusion t Support of Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u Filling the gap with Semantic Web Query Languages v Non canonical ontologies and view mechanism at ontology level v. Link with reasoning techniques u Integration v. Implementation of integration operators v. Associate several contents for a class u Improve linguistic exploitation u Describing ontology models v. Exploitation of the meta-schema (E, A) extension capability 25
Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL Questions 26
u Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL Semantic Web Query Languages u u Motivation Onto. QL proposal Related Work system catalog SPARQL SELECT ? p, ? name, ? age, ? city FROM http: //lisi. ensma. fr WHERE (? p rdf: type C_Person), (? p a_Name ? name), (? p a_Age ? age) OPTIONAL (? p a_address ? a), (? a a_city ? city) 3 Store RDF storage 27
u Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL Semantic Web Query Languages u u Motivation Onto. QL proposal Related Work system catalog RQL ontology content SELECT p, name, age, city FROM Person{p}, {p} a_Name {name}, {p} a_age {age}, {p} a_address {a}. a_city {city} RDFSuite, SESAME, ICS-Forth 28
Formal semantics of Onto. QL: Onto. Algebra u u u Motivation Onto. QL proposal Related Work Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u Operator’s signatures t (E C) x 2(OC I) --> (E C) x 2(OC I) u Main Operators t Onto. Image, Onto. Project, Onto. Select, Onto. OJoin t Example: interpretation of Onto. Image on the content part of an OBDB v Onto. Image: C x 2 I x Function --> C x 2 I v c C, {i 1 , … , , in} 2 I => Onto. Image(c, {i 1 , … , , in}, f) = (Prop. Range(f), {Onto. Val(i 1, f), …, Onto. Val(in, f)} where for i I, p P Onto. Val(i, p) = val(i, p), if p Schema. Prop(Type. Of(i)) else, UNKNOWN SELECT adress. city FROM Person onto. Image ext* Address. city left outer join Person table_person city table_address table_student u Adapted from the ENCORE algebra t Shaw and Zdonik « a Query Algebra for Object-Oriented Databases » 29
Context Ontology: our points of view Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL u Conceptual ontology (CO) the representation of the categories of objects and of the properties of objects available in some part of the world. u Linguistic ontology (LO) the representation of the meaning of the words used in a particular Universe of Discourse, in a particular language. u A layered view [WEBIST 2006] LO NCCO u Examples (available at http: //plib. ensma. fr)[ISO 13584] v Electronic, petrolium, IMA, Mechanics, Measuring instruments, etc. u Applications to B 2 B and E-Engineering [IJPLM 2006] 30
Context Target of the language v. Semantic Integration of heterogeneous information DB Stéphane JEAN, Yamine AIT AMEUR and Guy PIERRA ODBASE’ 06, Montpellier, Oct 31 - Nov 2, 2006 Querying Ontology Based Databases Using Onto. QL t Main Objective ontology system catalog ? logical model t Other Objectives v Semantic Web ontology HTML documents 31
- Slides: 31