**Warning:**

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

# TF-Graphs/Dataset-semantics

# 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 *K _{E}* be the set of all

*E*-interpretations. The interpretation of an RDF Dataset (

*G*, (<

*n*

_{1}>,

*G*

_{n1}), ..., (<

*n*

_{k}>,

*G*

_{nk})) 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

*K*.

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

Following standard definitions, we say that a dataset *D*=(*G*, (<*n*_{1}>,*G*_{n1}), ..., (<*n*_{k}>,*G*_{nk})) entails a dataset (*H*, (<*m*_{1}>,*H*_{m1}), ..., (<*m*_{p}>,*H*_{mp})) 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*, (<*n*_{1}>,*G*_{n1}), ..., (<*n*_{k}>,*G*_{nk})) is satisfied (or is true) in (*I*,*Con*) if it dataset satisfies*D***and***I*(<*n*_{1}>) =*G*_{n1}.

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 . }