Ontological Modeling: Part 14

Similar documents
Ontological Modeling: Part 15

Ontological Modeling: Part 11

Ontological Modeling: Part 13

Ontological Modeling: Part 7

Ontological Modeling: Part 8

Logical Data Modeling: Part 12

Ontological Modeling: Part 2

Verbalizing Business Rules: Part 10

Verbalizing Business Rules: Part 9

Introduction to modeling. ER modelling

Entity Relationship modeling from an ORM perspective: Part 2

UML data models from an ORM perspective: Part 4

Automatic Transformation of Relational Database Schema into OWL Ontologies

Logical Data Modeling: Part 7

Logical Data Modeling: Part 1

Microsoft s new database modeling tool: Part 3

A CONCEPTUAL SCHEMA BASED ON RDFS-OWL AND CONSISTENCY CONSTRAINT CHECKING WITH XQuery*

Information Modeling and Relational Databases

Microsoft s new database modeling tool: Part 5

Schema Equivalence and Optimization

Chapter 3 Research Method

Table of Contents. iii

Reasoning with the Web Ontology Language (OWL)

Easing the Definition of N Ary Relations for Supporting Spatio Temporal Models in OWL

UML Data Models From An ORM Perspective: Part 3

OWL a glimpse. OWL a glimpse (2) requirements for ontology languages. requirements for ontology languages

Semantic Web Technologies: Web Ontology Language

Web Ontology Language: OWL

FHIR RDF Sample side by side comparisons

9 The Ontology UML Profile

CSC Discrete Math I, Spring Sets

Grounding OWL-S in SAWSDL

H1 Spring B. Programmers need to learn the SOAP schema so as to offer and use Web services.

OWL Web Ontology Language

Short notes about OWL 1

Main topics: Presenter: Introduction to OWL Protégé, an ontology editor OWL 2 Semantic reasoner Summary TDT OWL

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

Schema Equivalence and Optimization

Uniqueness and Identity Rules in ORM

Tony Mallia Edmond Scientific

1. Introduction to SWRL

Integration of the Semantic Web with Meta Object Facilities

Comparison of Semantic Web serialization syntaxes

12th ICCRTS. On the Automated Generation of an OWL Ontology based on the Joint C3 Information Exchange Data Model (JC3IEDM)

OWL 2 Update. Christine Golbreich

LINKING BACKGROUND INFORMATION

Mandatory Roles. Dr. Mustafa Jarrar. Knowledge Engineering (SCOM7348) (Chapter 5) University of Birzeit

Contents. G52IWS: The Semantic Web. The Semantic Web. Semantic web elements. Semantic Web technologies. Semantic Web Services

An Alternative CIM Modeling Approach using JSON-LD

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

An RDF-based Distributed Expert System

RDF /RDF-S Providing Framework Support to OWL Ontologies

CC LA WEB DE DATOS PRIMAVERA Lecture 4: Web Ontology Language (I) Aidan Hogan

INF3580/4580 Semantic Technologies Spring 2017

Querying Data through Ontologies

Deep integration of Python with Semantic Web technologies

Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys

A Framework for OWL DL based Ontology Construction from Relational Database using Mapping and Semantic Rules

OWL 2 Web Ontology Language Primer W3C Recommendation 27 October 2009

An Introduction to the Semantic Web. Jeff Heflin Lehigh University

Semantic Web KM: A Knowledge Machine for Semantic Webs

ORM Modeling Tips and Common Mistakes

Description Logic. Eva Mráková,

INF3580 Semantic Technologies Spring 2012

Simplified Approach for Representing Part-Whole Relations in OWL-DL Ontologies

Extracting Ontologies from Standards: Experiences and Issues

Modeling LMF compliant lexica in OWL-DL

Semantic Technologies

Why Ontologies? RRDIU - Semantic Web 2

KDI OWL. Fausto Giunchiglia and Mattia Fumagallli. University of Trento

Chapter 2 Conceptual Modeling. Objectives

Subset, Equality, and Exclusion Rules In ORM

ORM and Description Logic. Dr. Mustafa Jarrar. STARLab, Vrije Universiteit Brussel, Introduction (Why this tutorial)

OWL 2 Web Ontology Language Primer

AutoRDF - Using OWL as an Object Graph Mapping (OGM) specification language

Semantic Web in Depth: Web Ontology Language (OWL) Dr Nicholas Gibbins 32/3019

LECTURE 09 RDF: SCHEMA - AN INTRODUCTION

Object-role modelling (ORM)

4 The StdTrip Process

Chapter 8: Enhanced ER Model

OWL and tractability. Based on slides from Ian Horrocks and Franz Baader. Combining the strengths of UMIST and The Victoria University of Manchester

Chapter 2 AN INTRODUCTION TO THE OWL WEB ONTOLOGY LANGUAGE 1. INTRODUCTION. Jeff Heflin Lehigh University

Efficient Querying of Web Services Using Ontologies

A Formal ORM-to -UML Mapping Algorithm

Limitations of the WWW

OWL Full and UML 2.0 Compared

A Frame-based Resource Description Framework Expert System

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

2. RDF Semantic Web Basics Semantic Web

SPARQL: An RDF Query Language

OWL 2 Web Ontology Language:Mapping to RDF Graphs W3C Working Draft 02 December 2008

The OWL API: An Introduction

Subtyping Revisited. Terry Halpin. Neumont University South Jordan, Utah. USA

MI-PDB, MIE-PDB: Advanced Database Systems

Guided Tour: Intelligent Conceptual Modelling in EER and UML-like class diagrams with icom compared to ORM2

Introduction to modeling

Knowledge Representation. Apache Jena Part II. Jan Pettersen Nytun, UiA

Proposal for Implementing Linked Open Data on Libraries Catalogue

ARISTOTLE UNIVERSITY OF THESSALONIKI. Department of Computer Science. Technical Report

Introduction to Conceptual Data Modeling

Transcription:

Ontological Modeling: Part 14 Terry Halpin INTI International University This is the fourteenth in a series of articles on ontology-based approaches to modeling. The main focus is on popular ontology languages proposed for the Semantic Web, such as the Resource Description Framework (RDF), RDF Schema (RDFS), and the Web Ontology Language (OWL). The first article [3] introduced ontologies and the Semantic Web, and covered basic concepts in the Resource Description Framework (RDF), contrasting them with other data modeling approaches. The second article [4] discussed the N3 notation for RDF, and covered the basics of RDF Schema. The third article [5] provided further coverage of RDFS, and introduced different flavors of the Web Ontology language (OWL). The fourth article [6] discussed basic features of OWL, mainly using Manchester syntax. The fifth article [7] discussed OWL taxonomy, comparison operators for classes, data types and predicates, and examined inverses, functional roles and keys in more depth. The sixth article [8] covered cardinality restrictions in OWL 2. The seventh article [9] discussed the union, intersection, and complement operators in OWL 2. The eighth article [10] explored support for ring constraints within OWL 2. The ninth article [11] discussed enumerated types as well as value restrictions on properties in OWL 2. The tenth article [12] examined OWL 2 s support for property chains, and compared this with related concepts in data modeling approaches. The eleventh article [13] reviewed the logical status of structural statements in OWL 2, contrasting this with other data modeling approaches that support both integrity constraints and derivation rules. The twelfth article [14] discussed how to express negated facts in OWL 2, and avoid circularity when declaring subproperty chains. The thirteenth article [14] provided a detailed comparison of the ways in which OWL 2, ORM, Barker ER, UML 2.5, and relational databases support simple identifiers. The current article discusses modeling of unary facts, and extends the comparison of identification schemes in [15] by considering one complex case of reference schemes (compound identifiers). Unary Facts Figure 1(a) depicts a simple data model about hospital patients in the graphical notation of Object-Role Modeling (ORM) [2]. Each patient is identified by a patient number, and has exactly one patient name (not necessarily identifying). The fact type Patient smokes is used to record which patients smoke. Sample data are provided in the fact tables. The entry 102 in the fact table for Patient smokes indicates that Patient 102 smokes. This model adopts closed world semantics, so the absence of an entry for patients 101 and 102 in this fact table indicates that patients 101 and 103 do not smoke. The fact type Patient smokes is said to be a unary fact type, because its logical predicate (smokes) is unary (i.e. has a single argument). Figure 1(b) and Figure 1(c) show equivalent schemas without the sample data in the notation of Barker ER [1] and UML [17] respectively. Both of these capture smoking facts by using a Boolean attribute (e.g. Patient.isSmoker). Alternatively, all three notations could model smoking facts by introducing a Smoker subtype/subclass of Patient. Figure 1 A simple Patient model in the graphical notation of (a) ORM, (b) Barker ER, and (c) UML. 1

Previous articles in this series discussed how to model subtyping and binary relationships in OWL, but not unary facts expressed as unary relationships (e.g. Patient 102 smokes) or Boolean attribute assignments (e.g. 102:Patient.isSmoker = true). Recall that all facts in OWL must be expressed subject-predicate-object triples, where the predicate is a binary relationship. Hence, unary facts are expressed in OWL by using a binary predicate to relate the subject to an object that is either a Boolean value (true or false) or a status value with two possibilities (e.g. Smoker, NonSmoker ). Table 1 shows an OWL encoding of the model in Figure 1 using the data property issmoker to map patients onto Boolean values (see the code highlighted in italics). We assert that patient 102 smokes by mapping its issmoker data property to the value true. OWL adopts open world semantics, so the absence of a proposition (e.g. Patient 101 smokes) does not imply that the proposition is false. To match the models shown in Figure 1, we need to apply closed world semantics for smoking facts. We therefore make the issmoker data property mandatory (minimum multiplicity of 1) for Patient, and explicitly assert that patients 101 and 103 do not smoke by mapping their issmoker data property to the value false. Table 1 Coding the Figure 1 model in OWL Manchester Syntax DataProperty: haspatientnr Domain: Patient DataProperty: haspatientname Domain: Patient Range: xsd:string DataProperty: issmoker Domain: Patient Range: xsd:boolean Class: Patient HasKey: haspatientnr SubClassOf: haspatientnr min 1 xsd:integer SubClassOf: issmoker min 1 xsd:boolean Individual: Patient101 Types: Patient Facts: haspatientnr 101 Facts: haspatientname "John Smith", issmoker false Individual: Patient102 Types: Patient Facts: haspatientnr 102 Facts: haspatientname "John Smith", issmoker true Individual: Patient103 Types: Patient Facts: haspatientnr 103 Facts: haspatientname "Ann Jones", issmoker false Turtle Syntax :haspatientnr a owl:datatypeproperty, rdfs:domain :Patient ; :haspatientname a owl:datatypeproperty, rdfs:domain :Patient ; rdfs:range xsd:string. :issmoker a owl:datatypeproperty ; rdfs:domain :Patient ; rdfs:range xsd:boolean. :Patient owl:haskey ( :haspatientnr ) ; rdfs:subclassof [ a owl:restriction ; owl:onproperty :haspatientnr ; [ a owl:restriction ; owl:onproperty :issmoker ; "1"^^xsd:nonNegativeInteger; owl:ondatarange xsd:boolean ]. :Patient101 a :Patient, owl:namedindividual ; :haspatientnr 101 ; :haspatientname "John Smith" ; :issmoker "false"^^xsd:boolean. :Patient102 a :Patient, owl:namedindividual ; :haspatientnr 102 ; :haspatientname "John Smith" ; :issmoker "true"^^xsd:boolean. :Patient103 a :Patient, owl:namedindividual ; :haspatientnr 103 ; :haspatientname "Ann Jones" ; :issmoker "false"^^xsd:boolean. 2

(a) (b) (c) smokes 102 Patient (.Nr) 101 102 103 has 101 102 103 John Smith John Smith Ann Jones PatientName PATIENT # * patient nr * patient name o is a smoker Patient nr: Integer [1] {id} name: String [1] issmoker: Boolean [0..1] {issmoker = true or issmoker -> isempty()} Figure 2 Adopting open world semantics for smoking facts in (a) ORM, (b) Barker ER, and (c) UML. Figure 2(a) shows an ORM model where open world semantics is adopted for the fact type Patient smokes, as shown by the dashed (and hence open) line for the smokes predicate. In this case, the absence of entries for 101 and 103 in the smokes fact table indicates that it is unknown whether they smoke. In this model, there is no way to explicitly assert that a given patient does not smoke. Figure 2(b) partly captures this in the Barker ER version of the model by indicating that the is a smoker attribute is optional (as indicated by the preceding o instead of * ). We also need to ensure that the only values allowed for this attribute are true and null, but the Barker ER notation does not display this on the diagram. Figure 2(c) fully captures the semantics in UML by assigning a multiplicity of [0..1] to the issmoker attribute and adding a note to prevent the attribute being assigned the value false. The open world semantics model in Figure 2(a) may be coded in OWL by modifying the code shown in Table 2 as follows: remove the minimum multiplicity of 1 restriction on the issmoker data property; remove the issmoker false fact assertions for patients 101 and 103. Figure 3(a) shows an ORM model where open world with negation semantics is adopted for the fact type Patient smokes, as shown by the tilde ~ (a logical symbol for negation) inside the dashed line box for the smokes predicate. In this case, the entry ~101 in the smokes fact table indicates that patient 101 does not smoke, the 102 entry indicates that patient 102 does smoke, and the absence of an entry for 103 in the smokes fact table indicates that it is unknown whether patient 103 smokes. Figure 3(b) and Figure 3(c) show the equivalent schemas in Barker ER and UML respectively: the issmoker attribute is optional, but may be assigned true or false where known. Figure 3 Adopting open world with negation semantics for smoking facts in (a) ORM, (b) Barker ER, and (c) UML. The open world with negation semantics model in Figure 3(a) may be coded in OWL by modifying the code shown in Table 2 as follows: remove the minimum multiplicity of 1 restriction on the issmoker data property; remove the issmoker false fact assertion for patient 103. As you can see, how unary facts are coded in OWL depends on how complete your knowledge is. If you have complete knowledge of the relevant property, choose the code for closed world semantics. If you know some instances where the property is true, and some where the property is false, but there are also some instances where you don t know the truth value of the property, then choose the code for open world with negation semantics. If you know some instances where the property is true but have no knowledge of where the property is false, then choose the code for simple, open world semantics. In practice, closed world semantics and open world with negation semantics are the most common cases. 3

Compound Identifiers A compound reference scheme identifies entities of a given type by means of a combination of two or more attributes or relationships. For example, in the ORM schema of Figure 4(a), rooms are identified by combining their building number with their local room number (e.g. the room in building 1 with room number 205 is distinct from the room in building 2 with room number 205). The circled double bar denotes an external uniqueness constraint underlying this compound, preferred reference scheme for Room. This corresponds to fact verbalizations that identify rooms by compound definite descriptions (e.g. the Room that is in the Building with BuildingNr 1 and has RoomNr 205 ). The circled single bar depicts an external uniqueness constraint for a compound, alternate reference scheme for buildings based on a combination of their x and y coordinates. Buildings also have a simple, preferred reference scheme (based on building number). The unary fact type Room is windowed is used to record which rooms have a window. Figure 4 A compound reference scheme for rooms in the notation of (a) ORM, (b) Barker ER, and (c) UML. Figure 4(b) shows a Barker ER schema for the same example. The composite reference scheme for Room is indicated by the # on the room nr attribute and the vertical stroke through Room s role in its containment relationship with Building. The simple reference scheme for Building is captured by the # on the building nr attribute. However, Barker ER has no way to indicate that the building coordinate pair provides an alternate reference scheme for Building. Figure 4(c) shows a UML class diagram for the same example. The composite reference scheme for Room is captured by marking the attribute Room.nr and the association end Room.building with the {id} modifier. The simple reference scheme for Building is indicated by the {id} modifier on Building.nr. However, UML cannot graphically depict that the coordinate combination is also unique for buildings. Table 2 lists the OWL code for the model in Figure 4, along with a sample population. The iswindowed predicate is declared as a data property with domain Room and range xsd:boolean, with individual facts using true or false as appropriate. For the external uniqueness constraints in Figure 4(a), composite HasKey properties are declared as shown in italics. However, as explained in the previous article [15], these HasKey declarations have no effect on specific room or building instances unless an IRI is also explicitly declared for those instances. In this case, I ve used meaningful IRIs (e.g. Room1-205 for room 205 in building 1). However, in cases where this is impractical (e.g. consider IRIs for street addresses), we could use surrogate identifiers (e.g. address_1, address_2, etc.) or instead simply abandon any attempt to capture the uniqueness semantics in the OWL ontology. 4

Table 2 Coding the model in Figure 4 in OWL Manchester Syntax ObjectProperty: isinbuilding Domain: Room Range: Building ObjectProperty: containsroom InverseOf: isinbuilding DataProperty: hasbuildingnr Domain: Building DataProperty: hasxcoordinate Domain: Building DataProperty: hasycoordinate Domain: Building DataProperty: hasroomnr Domain: Room DataProperty: iswindowed Domain: Room Range: xsd:boolean Class: Building HasKey: hasbuildingnr HasKey: hasxcoordinate, hasycoordinate SubClassOf: hasbuildingnr min 1 xsd:integer SubClassOf: hasxcoordinate min 1 xsd:integer SubClassOf: hasycoordinate min 1 xsd:integer Class: Room HasKey: isinbuilding, hasroomnr HasKey: hasxcoordinate, hasycoordinate SubClassOf: isinbuilding min 1 Building SubClassOf: hasroomnr min 1 xsd:integer SubClassOf: iswindowed min 1 xsd:boolean Turtle Syntax :isinbuilding a owl:functionalproperty, owl:objectproperty ; rdfs:range :Building ; rdfs:domain :Room. :containsroom a owl:objectproperty ; owl:inverseof :isinbuilding. :hasbuildingnr a owl:datatypeproperty, rdfs:domain :Building ; :hasxcoordinate a owl:datatypeproperty, rdfs:domain :Building ; :hasycoordinate a owl:datatypeproperty, rdfs:domain :Building ; :hasroomnr a owl:datatypeproperty, rdfs:domain :Room ; :iswindowed a owl:datatypeproperty, rdfs:domain :Room ; rdfs:range xsd:boolean. :Building a owl:class ; rdfs:subclassof owl:onproperty :hasycoordinate ; owl:onproperty :hasxcoordinate ; owl:onproperty :hasbuildingnr ; owl:ondatarange xsd:integer ] ; owl:haskey ( :hasxcoordinate :hasycoordinate ), ( :hasbuildingnr ). :Room a owl:class ; rdfs:subclassof owl:onproperty :iswindowed ; owl:ondatarange xsd:boolean ], owl:onproperty :hasroomnr ; 5

owl:onproperty :isinbuilding ; owl:onclass :Building ; "1"^^xsd:nonNegativeInteger ] ; owl:haskey ( :hasxcoordinate :hasycoordinate ), ( :isinbuilding :hasroomnr ). Individual: Building1 Types: Building Facts: hasbuildingnr 1, hasxcoordinate 100, hasycoordinate 50 Individual: Building2 Types: Building Facts: hasbuildingnr 2, hasxcoordinate 123, hasycoordinate 55 Individual: Room1-205 Types: Room Facts: isinbuilding Building1, hasroomnr 205, iswindowed true Individual: Room2-205 Types: Room Facts: isinbuilding Building2, hasroomnr 205, iswindowed false :Building1 a :Building, owl:namedindividual ; :hasbuildingnr 1 ; :hasxcoordinate 100 ; :hasycoordinate 50. Building2 a :Building, owl:namedindividual ; :hasxcoordinate 123 ; :hasbuildingnr 2 ; :hasycoordinate 55. :Room1-205 a :Room, owl:namedindividual ; :isinbuilding :Building1 ; :hasroomnr 205 ; :iswindowed "true"^^xsd:boolean. :Room2-205 a :Room, owl:namedindividual ; :isinbuilding :Building2 ; :hasroomnr 205 ; :iswindowed "true"^^xsd:boolean. Conclusion The current article discussed how to model unary facts in ORM, Barker ER and UML, and how to encode them in OWL by using data properties with a Boolean range. It also compared the different ways in which ORM, Barker ER, UML and OWL support compound identification schemes. The next article discusses how these various modeling notations support more complex kinds of identification schemes (viz. disjunctive reference, and context-dependent reference). References 1. Barker, R. 1990, CASE*Method: Entity Relationship Modelling, Addison-Wesley, Wokingham. 2. Halpin, T. & Morgan, T. 2008, Information Modeling and Relational Databases, 2 nd edition, Morgan Kaufmann, San Francisco. 3. Halpin, T. 2009, Ontological Modeling: Part 1, Business Rules Journal, Vol. 10, No. 9 (Sep. 2009), URL: http://www.brcommunity.com/a2009/b496.html. 4. Halpin, T. 2009, Ontological Modeling: Part 2, Business Rules Journal, Vol. 10, No. 12 (Dec. 2009), URL: http://www.brcommunity.com/a2009/b513.html. 5. Halpin, T. 2010, Ontological Modeling: Part 3, Business Rules Journal, Vol. 11, No. 3 (March 2010), URL: http://www.brcommunity.com/a2010/b527.html. 6. Halpin, T. 2010, Ontological Modeling: Part 4, Business Rules Journal, Vol. 11, No. 6 (June 2010), URL: http://www.brcommunity.com/a2010/b539.html. 7. Halpin, T. 2010, Ontological Modeling: Part 5, Business Rules Journal, Vol. 11, No. 12 (Dec. 2010), URL: http://www.brcommunity.com/a2010/b570.html. 8. Halpin, T. 2011, Ontological Modeling: Part 6, Business Rules Journal, Vol. 12, No. 2 (Feb., 2011), URL: http://www.brcommunity.com/a2011/b579.html. 6

9. Halpin, T. 2011, Ontological Modeling: Part 7, Business Rules Journal, Vol. 12, No. 6 (Jun., 2011), URL: http://www.brcommunity.com/a2011/b602.html. 10. Halpin, T. 2011, Ontological Modeling: Part 8, Business Rules Journal, Vol. 12, No. 9 (Sep., 2011), URL: http://www.brcommunity.com/a2011/b614.html. 11. Halpin, T. 2011, Ontological Modeling: Part 9, Business Rules Journal, Vol. 12, No. 12 (Dec., 2011), URL: http://www.brcommunity.com/a2011/b629.html. 12. Halpin, T. 2012, Ontological Modeling: Part 10, Business Rules Journal, Vol. 13, No. 3 (Mar., 2012), URL: http://www.brcommunity.com/a2012/b644.html. 13. Halpin, T. 2012, Ontological Modeling: Part 11, Business Rules Journal, Vol. 13, No. 6 (Jun., 2012), URL: http://www.brcommunity.com/a2012/b657.html. 14. Halpin, T. 2012, Ontological Modeling: Part 12, Business Rules Journal, Vol. 13, No. 11 (Nov., 2012), URL: http://www.brcommunity.com/a2012/b678.html. 15. Halpin, T. 2013, Ontological Modeling: Part 13, Business Rules Journal, Vol. 14, No. 3 (March, 2013), URL: http://www.brcommunity.com/a2013/b693.html. 16. Halpin, T. 2013, Modeling of Reference Schemes, BPMDS 2013 and EMMSAD 2013, eds. I. Bider et al. LNBIP 147, Springer-Verlag, Berlin Heidelberg, pp. 308 323. 17. Object Management Group 2012, OMG Unified Modeling Language (OMG UML), version 2.5 FTF Beta 1. Available online at: http://www.omg.org/spec/uml/2.5. 18. NORMA tool (www.ormsolutions.com): available online at www.ormfoundation.org. 19. W3C 2012, OWL 2 Web Ontology Language: Primer (Second Edition), URL: http://www.w3.org/tr/owl2-primer/. 20. W3C 2012, OWL 2 Web Ontology Language: Direct Semantics (Second Edition), URL: http://www.w3.org/tr/owl2-direct-semantics/. 21. W3C 2012, OWL 2 Web Ontology Language Manchester Syntax (Second Edition), URL: http://www.w3.org/tr/owl2-manchester-syntax/. 22. W3C 2012, OWL 2 Web Ontology Language Structural Specification and Functional-Style Syntax (Second Edition), URL: http://www.w3.org/tr/owl2-syntax/. 7