Linked Data Modeling

Triply B.V.

Terms: Syntax

RDF terms

  • Names
    • IRIs
    • Literals
  • Blank nodes

IRI equality

Character-for-character comparison [RFC 3987, §5.1]

IRI best practices

Triply Workflow

Literal components

Lexical form
Value serialization in a Unicode string.
Datatype IRI
An IRI of type rdfs:Datatype.
Language tag
Only set for datatype IRI rdf:langString. Standardized in RFC 5646 / BCP 47.

Literal equality

Defined in the value space (see semantics).

Literal best practices

Canonical form, defined through semantic reserialization.

Triply Workflow

Terms: Semantics

Formal meaning

Meaning is formalized with 2 functions:

Interpretation function ($I$)
From terms (syntax) to resources and properties (semantics).
Extension function ($Ext$)
From properties (semantics) to pairs of resources (semantics).

A pair consisting of an interpretation and extension function is called a model ($M$).

Meaning of terms

  • The interpretation of a node is the resource it refers to.
  • The interpretation of a predicate term is the property it denotes.
  • The extension of a property is the collection of pairs of resources that are connected by that property.

Meaning of terms: example

Meaning of literals

For every datatype IRI $d$:

Lexical space
Value space
N-to-1 mapping from $Lex(d)$ to $Val(d)$.
1-to-1 mapping from $Val(d)$ to $Lex(d)$.

Syntactic normalization of literals

Literal "abc"^^:d


1 →

Atomic sentences: Syntax

Atomic sentence

A sequence of three terms.

More commonly called ‘triple’.

Syntactic term roles within a triple

Language analogue:

  • Subject
  • Predicate
  • Object

Graph analogue:

  • Node
    • Source
    • Target, Sink
  • Edge

Atomic sentences: Semantics

Meaning of sentences: Truth-conditional Semantics

To understand what a sentence means is to know what is the case if it would be true. (One can understand a sentence, without knowing whether it is true.)
Tractatus Logico-Philosophicus, 4.024

Truth of a triple

$$\langle s,p,o \rangle \text{ is true} \iff \langle I(s),I(o) \rangle \in Ext(I(p))$$

$$\langle \text{the Louvre}, \text{owns}, \text{the Mona Lisa} \rangle \text{ is true} \iff$$ $$\langle I(\text{the Louvre}), I(\text{the Mona Lisa}) \rangle \in Ext(I(\text{owns})) \iff$$ $$\langle 🏰, 🖼 \rangle \in Ext(\text{concept-of-ownership}) \iff$$ $$\langle 🏰, 🖼 \rangle \in \{ \langle 🏰, 🖼 \rangle, \langle 👱, 🚗 \rangle \}$$

Falsity of a triple

$$\langle s,p,o \rangle \text{ is true} \iff \langle I(s),I(o) \rangle \in Ext(I(p))$$

$$\langle \text{the Mona Lisa}, \text{owns}, \text{the Louvre} \rangle \text{ is true} \iff$$ $$\langle I(\text{the Mona Lisa}), I(\text{the Louvre}) \rangle \in Ext(I(\text{owns})) \iff$$ $$\langle 🖼, 🏰 \rangle \in Ext(\text{concept-of-ownership}) \iff$$ $$\langle 🖼, 🏰 \rangle \in \{ \langle 🏰, 🖼 \rangle, \langle 👱, 🚗 \rangle \}$$

Meaning of a triple

The meaning of a triple is the set of models in which the triple is true.

(Remember: A model is a pair of an interpretation and extension function.)

Graphs: Syntax

A graph is a set of triples.

Graphs: Semantics

Meaning of a graph

The meaning of a graph is the set of models in which all triples in the graph are true.

(Remember: A model is a pair of an interpretation and extension function.)

Data Modeling

Triply Workflow Step 7

Data modeling: Conceptualization

Identifying & defining the core concepts in a domain.

  • Lexicon
  • Taxonomy
  • Value lists

Conceptualization: Lexicon (1/2)


  1. Determine the core terms in a domain.
  2. Add definitions for those terms.

Lexicon example: key registry of topography

Conceptualization: Lexicon (2/2)

Lexicon item for ‘bridge’.

                    a owl:Class;
                    dct:subject concept:Bridge;
                    rdfs:isDefinedBy def:;
                    rdfs:seeAlso ""^^xsd:anyURI;
                    rdfs:subClassOf citygml:BridgeConstructionElement;
                    sdo:image img:bridge;
                      [ dct:creator "CROW";
                        rdf:value "Kunstwerk over een watervlakte of waterloop, bestaande uit een losliggend, al of niet beweegbaar brugdek gesteund door pijlers en/of landhoofden."@nl ].
  • Namespaces: def: for (class) definitions.
  • Link to concept scheme (if available): dct:subject
  • Best practice: class local name uses capitalization
  • Relation to the vocabulary (rdfs:isDefinedBy)
  • Lexicalization could be in multiple languages (rdfs:label)
  • Link to an existing definition (if available): rdfs:seeAlso
  • Pictoral definition/explanation: sdo:image
  • Textual definition: skos:definition
  • Source specification: nesting + rdf:value

Conceptualization: Taxonomy

Task: Add hierarchical relations to the lexicon.

Different kinds of hierarchy:

  • Inheritance (rdfs:subClassOf)
  • Physical (def:partOf)
  • Spatial (geo:sfWithin)
  • Genogram (def:hasParent)

Example key registry of topography: Insights, Org chart

Conceptualization: Value lists

                  id:thisBridge def:status "exists"@en.
                  id:thatBridge def:status "historic"@en.
The object terms are not yet defined.

                  id:thisBridge def:status status:exists.
                  id:thatBridge def:status status:historic.

                    a def:Status;
                    dct:subject concept:StatusExists;
                    rdfs:isDefinedBy def:;
                    rdfs:seeAlso ""^^xsd:anyURI;
                      [ dct:creator "IMGeo 1.0";
                        rdf:value "Situatie waarin het object wordt / kan worden gebruikt voor het doel waarvoor het is gebouwd / aangelegd."@nl ].

"exists"@nlstatus:exists + def:Status



The act of enriching a data model with human-readable labels, descriptions/definitions and documentation.

RDFS lexicalization

Related a definition to the vocabulary.
Link to an online source.

SKOS lexicalization

Alternative labels, intended for secondary display.
The formal definition.
The preferred label, intended for primary display.
A labels that could be used in search, but not in display.

Higher-order relationships

Higher-order relationship

Atomic sentences (triples) express binary relations, but complex sentences (graphs with joins) can express relations of arbitrary arity.

Use cases

  • Modalities
    • Alethic (necessity)
    • Deontic (ought)
    • Epistemic (belief)
  • Observational dimensions
  • Ternary verbs

Example: Belief

“Lois Lane believes that Superman is not Clark Kent.” (belief)

                    [ a rdf:Statement;
                      rdf:subject :superman;
                      rdf:predicate owl:differentFrom;
                      rdf:object :clarkKent ].

Example: Observations

“83 violent crimes were comitted in the Amsterdam Forest in 2018.”

                [ a qb:Observation;
                  :violentCrimes "83"^^xsd:nonNegativeInteger;
                    [ a :Neighborhood;
                      rdfs:label "Amsterdamse Bos"@nl ];
                  :temporalExtent/time:inXSDgYear "2018"^^xsd:gYear ].

                :violentCrimes a qb:MeasureProperty.
                :spatialExtent a qb:DimensionProperty.
                :temporalExtent a qb:DimensionProperty.


Example: Ternary verb

“John gave a puppy to Mary.”

                [ a rdf:Statement;
                  :subject :john;
                  :object :mary;
                  :passive :thisPuppy;
                    [ time:before :now ] ].

Missing information

Classes: value:MaybeT

Properties: rdf:type, value:absenceReason, value:templateArg1

Missing information

A property $p$ either has a value of type $T$ or has a reason for why the value is absent.

❌ “Let's use some crazy value”-approach

                [ a qb:Observation;
                  :violentCrimes "83"^^xsd:nonNegativeInteger;
                  :temporalExtent/time:inXSDgYear "2019"^^xsd:gYear ].

                  [ a qb:Observation;
                    :violentCrimes "999"^^xsd:nonNegativeInteger;
                    :temporalExtent/time:inXSDgYear "2018"^^xsd:gYear ].
  • What about extreme circumstandes (e.g., civil war)?
  • What happens to aggregate functions (e.g. average)?
  • More difficult to find real quality violations.

                  [ a qb:Observation;
                    :violentCrimes -1;
                    :temporalExtent/time:inXSDgYear "2018"^^xsd:gYear ].
  • Change the semantics of the property: negative values.
  • Negative crime, a string of negative length, etc.

❌ “Let's break the ontology”-approach

                  [ a qb:Observation;
                    :violentCrimes "83"^^xsd:nonNegativeInteger;
                    :temporalExtent/time:inXSDgYear "2019"^^xsd:gYear ].

                  [ a qb:Observation;
                    :violentCrimes "Not measured in 2018."@en;
                    :temporalExtent/time:inXSDgYear "2018"^^xsd:gYear ].
  • Better than the previous approach.
  • But difficult to query over.
  • And difficult to reason with.

How do others solve this?

Maybe T = Just T | Nothing

✓ Use templated class value:Maybe<T>

                  [ a qb:Observation;
                      [ a value:MaybeT;
                        rdf:value "83"^^xsd:nonNegativeInteger;
                        value:templateArg1 xsd:nonNegativeInteger ];
                    :temporalExtent/time:inXSDgYear "2019"^^xsd:gYear ].

                  [ a qb:Observation;
                      [ a value:MaybeT;
                        value:absenceReason :noMeasurement;
                        value:templateArg1 xsd:nonNegativeInteger ];
                    :temporalExtent/time:inXSDgYear "2018"^^xsd:gYear ].

Work around the lack of RDF templating

                      [ a owl:Class;
                          ( value:MaybeT
                            [ a owl:Restriction;
                              owl:hasValue xsd:nonNegativeInteger;
                              owl:onProperty value:templateArg1 ] ) ].

Relationship transfer

Classes: owl:Restriction

Properties: owl:equivalentClass, owl:hasValue, owl:onProperty

Relationship transfer

Transfers individuals in a relationship with one entity to another relationship with another entity, or:

“Everything related to A by property p should also be related to B but by property q.”

Relationship transfer

                  [ a owl:Restriction;
                    owl:hasValue :shapespeareCollection;
                    owl:onProperty dct:isPartOf;
                      [ a owl:Restriction;
                        owl:hasValue :shakespeare;
                        owl:onProperty dct:creator ] ].
“Works in the Shapespeare collection are written by Shakespeare.”

                  [ a owl:Restriction;
                    owl:hasValue "2018"^^xsd:gYear;
                    owl:onProperty :temporalExtent;
                      [ a owl:Restriction;
                        owl:hasValue :low;
                        owl:onProperty :trustworthiness ] ].
“Observations performed in 2018 are untrustworthy.”

Meta modelling

Class: foaf:Agent, foaf:Group

Property: foaf:member, foaf:membershipClass

Meta modelling

The same thing is sometimes modeled as an instance ánd a class.


                  :revolver foaf:maker :theBeatles.

                  :mcCarthy a :BeatlesMember.
                  :lennon a :BeatlesMember.
How should instance :theBeatles and class :BealtesMember be related?

Group of agents

With foaf:Group this can be avoided.

                  :revolver foaf:maker :theBeatles.

                    a foaf:Group;
                    foaf:membershipClass :BeatlesMember.

                  :mcCarthy a :BeatlesMember.
                  :lennon a :BeatlesMember.
:theBeatles is a foaf:Group, and a foaf:Agent, but not a subclass of foaf:Agent.

Meta-modelling with Relationship Transfer

                  a owl:ObjectProperty;
                  owl:inverseOf foaf:member.

                    [ a owl:Restriction;
                      owl:onProperty :isMemberOf;
                      owl:hasValue :theBeatles ].

Relationship transfer with $A$ = :BeatlesMember, $p$ = rdf:type, $B$ = :theBeatles, $q$ :isMemberOf

Instance & class

Classes: rdf:Property, rdfs:Class, rdfs:Datatype, rdfs:Resource

Properties: rdf:type (a)

Instances belong to classes

                      a def:Pokémon;
                      def:knows pokémon:mew;
                      def:name "ピカチュウ"@ja;
                      def:weight 60.

                      a def:Pokémon;
                      def:name "ミュウ"@ja;
                      def:weight 40.


                ⊧ "…"^^:d a :d. # If lex2val_d("…") ∈ val(d)

                :s :p :o.
                ⊧ :p a rdf:Property.

                :s :p "…"^^:d.
                ⊧ :d a rdfs:Datatype.

                :s :p :o.
                ⊧ :s a rdfs:Resource.

                :s :p :o.
                ⊧ :o a rdfs:Resource.

                :i a :c.
                :c rdfs:subClassOf :d.
                ⊧ :i a :d.

Multiple inheritance

Due to OWA, an instance can belong to classes that are not subclass/superclass of one other (see later).

Therefore, instances cannot be displayed in a tree.

Open World Assumption
Closed World Assumption

Difference between OWA and CWA

“Apples are green.”
“Are apples delicious?”
CWA answer
OWA answer
“I don't known.”

Why does the SW need OWA?

In a local database, we can assume that we always have full access to all the relevant data.

On the web, we may not always have access to all relevant data all of the time.

Example of OWA

  • I(the Louvre) = 🏰
  • I(the Mona Lisa) = 🖼
  • Ext(I(owns)) = {〈 🏰,🖼〉}
  • Ext(I(exhibits)) = {〈 🏰,🖼〉}

With CWA, owning and exhibiting would have the same meaning. With OWA, they may still be different.

  • I(owns) = concept-of-ownership
  • I(exhibits) = concept-of-exhibiting

OWA requires models to consist of 2 functions

Intension function (I)
Mapping RDF terms to resources.
Extension function (Ext)
Mapping properties to extensions. (Properties are resources.)

Corner cases (1/2)

                  rdfs:Class a rdfs:Class.
  • I(rdfs:Class) = 🐕
  • I(a) = 🐘
  • Ext(🐘) = {〈🐕,🐕〉, …}

This statement cannot be expressed with CWA, due to the axiom of regularity: $(\forall x)(x \neq \emptyset \rightarrow (\exists y \in x)(x \cap y = \emptyset))$

Corner cases (2/2)

                  owl:sameAs owl:sameAs owl:sameAs.
  • I(owl:sameAs) = ~
  • Ext(~) = {〈~,~〉, …}

$\langle \texttt{owl:sameAs}, \texttt{owl:sameAs}, \texttt{owl:sameAs} \rangle \,\text{is true}\\iff\\ \langle I(\texttt{owl:sameAs}), I(\texttt{owl:sameAs}) \rangle \in Ext(I(\texttt{owl:sameAs}))$

Notice that an RDF graph is a special kind of graph, i.e., vertices and edges may overlap.



Vocabulary of Interlinked Datasets

General metadata (1/2)

Web pages
The dataset homepage (owl:inverseFunctional).
Web pages that contain relevant information, but do not uniquely describe the dataset.
Dublin Core
  • dct:contributor
  • dct:created
  • dct:creator
  • dct:date
  • dct:description
  • dct:issued
  • dct:modified
  • dct:publisher
  • dct:source
  • dct:title

General metadata (2/2)

Contact information
foaf:mbox for the dct:contributor, dct:creator, dct:publisher.
dct:license, waiver:norms
Technical features
void:feature, formats

Access metadata

IRI dereferencing
This must always be supported (no metadata needed).
SPARQL endpoints
void:sparqlEndpoint, SPARQL 1.1 Service Description
Data dumps
Entry points
IRI lookup
Search engine

Structural metadata

Representative resources
IRI patterns
void:uriSpace, void:uriRegexPattern
class/property partition
void:classPartition (void:class), void:propertyPartition (void:property)
  • void:classes
  • void:distinctObjects
  • void:distinctSubjects
  • void:documents
  • void:entities (mathes of void:uriRegexPattern)
  • void:properties
  • void:triples

Class hierarchy

Properties: rdfs:subClassOf


                :c a rdfs:Class.
                ⊧ :c rdfs:subClassOf rdfs:Resource.

                :c a rdfs:Class.
                ⊧ :c rdfs:subClassOf :c.

                :c rdfs:subClassOf :d.
                :d rdfs:subClassOf :e.
                ⊧ :c rdfs:subClassOf :e.

                :d a rdfs:Datatype.
                ⊧ :d rdfs:subClassOf rdfs:Literal.

Class hierarchy visualization

Because of multiple inheritance, class hierarchies cannot be displayed in a tree.

Property hierarchy


When to use?

  • Model a sub-relation of a super-relation
  • Semantic variants of the same relation.

Derivation rules

                :p rdfs:subPropertyOf :q.
                :q rdfs:subPropertyOf :r.
                :p rdfs:subPropertyOf :r.

                :p a rdf:Property.
                :p rdfs:subPropertyOf :p.

                :p rdfs:subPropertyOf :q.
                :s :p :o.
                :s :q :o.

Model a sub-relation of a super-relation


                :child rdfs:subPropertyOf :relative.
                :daughter rdfs:subPropertyOf :child.
                :son rdfs:subPropertyOf :child.

                :parent rdfs:subPropertyOf :relative.
                :father rdfs:subPropertyOf :parent.
                :mother rdfs:subPropertyOf :parent.


                :daughter rdfs:subPropertyOf :relative.
                :son rdfs:subPropertyOf :relative.

                :father rdfs:subPropertyOf :relative.
                :mother rdfs:subPropertyOf :relative.

Semantic variants of the same relation


                :partOf rdfs:subPropertyOf :partOfTransitive.
                :partOfTransitive a owl:TransitiveProperty.


                :pikachusTail :partOf :pikachu.
                :pikachu :partOf :electricType.


                :pikachusTail :partOfTransitive :pikachu.
                :pikachu :partOfTransitive :electricType.

                :pikachusTail :partOfTransitive :electricType.

Domain & range

Properties: rdfs:domain, rdfs:range

When to use?

  • For every property definition.

Often used incorrectly

Examples from BioPortal (bpo).

Alternatives to domain & range

There are alternatives to rdfs:domain and rdfs:range, but these are semantically misguided.

  • dcam:domainIncludes
  • dcam:rangeIncludes
  • sdo:domainIncludes
  • sdo:rangeIncludes

Semantically speaking, statements with the above predicates have no meaning.


                :p rdfs:domain :c.
                :s :p :o.
                ⊧ :s a :c.

                :p rdfs:range :c.
                :s :p :o.
                ⊧ :o a :c.

Schema derivation is not possible

                :a :son :b.
                :son rdfs:subPropertyOf :child.
                :child rdfs:domain :Person.
                ⊧ :a :child :b.
                ⊧ :a a :Person.

The following cannot be derived…

                :son rdfs:domain :Person.

Containers & Collections

Classes: rdf:Alt, rdf:Bag, rdfs:ContainerMembershipProperty, rdf:List, rdf:Seq

Properties: rdf:first, rdf:nil, rdf:rest, rdfs:member, rdf:_1, …

When to use?

Default value + alternatives
Unordered & open
Ordered & open
Ordered & closed


For every positive integer ‘N’ there is a corresponding container membership property rdf:_N such that:

                rdf:_N rdfs:subPropertyOf rdfs:member.

Used to relate members to containers:

                :container rdf:_N :member.

RDF list

Abbreviated syntax in N3, Turtle and TriG.

                  [ a sdo:ScholarlyArticle;
                    bibo:authorList (:a :b :c) ].

                  [ a sdo:ScholarlyArticle;
                      [ rdf:first :a;
                          [ rdf:first :b;
                              [ rdf:first :c;
                                rdf:rest rdf:nil ] ] ] ].

(Single) linked list.


                :p a rdfs:ContainerMembershipProperty.
                ⊧ :p rdfs:subPropertyOf rdfs:member.

Semantic dialects

  • OWL DL
  • OWL Full
  • RDF
  • RDFS+
  • RDFS
  • SKOS


RDFS plus the following OWL DL concepts:

  • owl:Class
  • owl:DatatypeProperty
  • owl:FunctionalProperty
  • owl:InverseFunctionalProperty
  • owl:ObjectProperty
  • owl:SymmetricProperty
  • owl:TransitiveProperty
  • owl:equivalentClass
  • owl:equivalentProperty
  • owl:inverseOf
  • owl:sameAs

Unit of measure

Unit of measure (❌)

                      def:length 22;
                      def:weight 1355.

Length in meters, feet, other? Weight in pounds, kilos, other?

Unit of measure (✓)

                        [ def:unit dbd:meter;
                          rdf:value 2.2 ];
                        [ def:unit dbd:kilogram;
                          rdf:value 135.5 ].

Intermediate node + rdf:value.

Unit of measure (✓)

                      def:length "2.2"^^dbd:meter;
                      def:weight "135.5"^^dbd:kilogram.

Datatype IRI



A collection of named graphs.
Formal definition (RDF 1.1 Abstract Syntax)
A set of triples that are published, maintained or aggregated by a single provider. A meaningful collection of triples, that deal with a certain topic, originate from a certain source or process, are hosted on a certain server, or are aggregated by a certain custodian.
VoID, void:Dataset

Dataset description

                  graph:Mimi {
                      vocab:name "ਮੀਮੀ ਹੈਮਿੰਕ ਚਮਚਾ"@pa;
                      vocab:birthYear "1839"^^xsd:gYear .

                  graph:Multatuli {
                      foaf:knows id:Mimi;
                      vocab:name "ਮੁਲਤਾਤੁਲੀ"@pa;
                      vocab:birthYear "1820"^^xsd:gYear.

                  [ a void:Dataset;
                    dct:subject dbr:Literature;
                      graph:Multatuli ].



A triple whose subject and object are described in different datasets.

Linkset: Definition (void:Linkset)

A collection of links between two datasets.


  a void:Linkset;
  void:linkPredicate owl:sameAs;
  void:objectsTarget :to;
  void:subjectsTarget :from.

WIP: Events

Event example

Eduard Douwes Dekker worked at the Dutch East Indies throughout 1840.

Event (❌)

                  :Eduard :worksAt :East_Indies;
                  :begin "1840-01-01"^^xsd:date;
                  :end "1840-12-31"^^xsd:date.

Event (✓)

                    :Eduard :worksAt :East_Indies.
                      rdf:subject :Eduard;
                      rdf:predicate :worksAt;
                      rdf:object :East_Indies;
                    :begin "1840-01-01"^^xsd:date;
                    :end "1840-12-31"^^xsd:date.

RDF reification vocabulary

Event + uncertainty (✓)

                    :Eduard :worksAt :East_Indies.
                      rdf:subject   :Eduard;
                      rdf:predicate :worksAt;
                      rdf:object    :East_Indies;
                      time:hasBeginning [
                        time:inXSDDate "1840-01-01"^^xsd:date;
                        time:unitType  time:unitWeek ];
                      time:hasEnd [
                        time:inXSDDate "1840-12-31"^^xsd:date;
                        time:unitType  time:unitWeek ].
         (Time Ontology in OWL)

Linked Data Modeling

Triply B.V.