Warning:
This wiki has been archived and is now read-only.

TF-Graphs/Dataset-semantics

From RDF Working Group Wiki
Jump to: navigation, search

Simple dataset semantics

In substance, this formalization says that each RDF Graph in a Dataset is interpreted separately. This models the fact that different RDF Graphs hold in different contexts. This way, graphs that have been put in different "named graph pairs" can contradict with each other without making the Dataset inconsistent.

Like RDF interpretations, a dataset-interpretation is relative to a vocabulary V. Moreover, dataset interpretations are defined with respect to an entailment regime E, as defined in SPARQL 1.1 Entailment Regimes. Let KE be the set of all E-interpretations. The interpretation of an RDF Dataset (G, (<n1>,Gn1), ..., (<nk>,Gnk)) over vocabulary V is a pair (I,Con) where I is an E-interpretation of G (the default graph) and Con is a mapping from V to KE.

A dataset-interpretation (I,Con) of a vocabulary V wrt entailment regime E satisfies an RDF Dataset (G, (<n1>,Gn1), ..., (<nk>,Gnk)) iff I E-satisfies G, and for all i in [1..k], Con(ni) exists and E-satisfies Gni.

Following standard definitions, we say that a dataset D=(G, (<n1>,Gn1), ..., (<nk>,Gnk)) entails a dataset (H, (<m1>,Hm1), ..., (<mp>,Hmp)) iff all dataset-interpretation (I, Con) that satisfies D also satisfy H.

Some RDF engines or graph store implementation may want to add constraints on valid interpretations, for instance that the default RDF Graph entails all the named RDF Graphs, but this is not mandated by this specification since there are use cases for the contrary. A typical restriction would be that IRIs must be interpreted identically by all Con(u) for all u.

Extension 1: Quote-semantics

This semantic extension of the dataset semantics is made to express the fact that a graph inside a <name,graph> pair is quoted (that is, it has to be taken exactly "as is", without modification). A consequence of this is that it is not allow to infer anything from the quoted graph. What counts is the exact content, not it means.

To do that, we introduce the term rdf:QuotedGraph, which is a class. The following defines formally a "quote-interpretation".

A quote-interpretation of a vocabulary V is a dataset-interpretation (I,Con) that satisfies the following conditions:

  • if x is in ICEXT(I(rdf:QuotedGraph)) then x is an RDF graph;
  • a dataset D = (G, (<n1>,Gn1), ..., (<nk>,Gnk)) is satisfied (or is true) in (I,Con) if it dataset satisfies D and I(<n1>) = Gn1.

This means that the graph IRI in a name,graph pair must be interpreted as the graph itself. Here is how it is used:

@prefix : <http://example.com/>
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# This is the default graph
:n2  a  rdf:QuotedGraph .
:n1 {
  :ageInText  rdfs:subPropertyOf  :age;
              rdfs:range  rdf:LangString .
  :alice  :ageInText  "twenty-eight"@en .
}
:n2 {
  :age  rdfs:range  xsd:decimal .
  :alice  :age  31 .
}

This RDFS-dataset-entails, for instance:

:n1 {
  :alice  :age  "twenty-eight"@en .
}

but does not entail:

:n2 {
  :age  a  rdf:Property .
}

since :n2 is forced to denote the RDF graph:

:n2 {
  :age  rdfs:range  xsd:decimal .
  :alice  :age  31 .
}