The RDF Dataset Delta Ontology describes a directional, durable RDF resource for the structural difference between identified baseline and result dataset snapshots. It preserves exact triple-or-quad identity, graph position, contextual additions and removals, empty deltas, and inverse membership directions while keeping completeness evidence, comparison activity, semantic interpretation, and patch execution separate. A secondary reference SPARQL projection demonstrates how to construct exact deltas from two Service Description manifests.
This is an unofficial 0.1 Editor's Draft maintained by Inferal. Its namespace and terms are draft and may evolve before a stable release.
Feedback should be sent to contact@inferal.com.
The key words MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, and MAY in this document are to be interpreted as described in [[BCP14]] when, and only when, they appear in all capitals.
A conforming delta graph uses the vocabulary according
to the open-world meanings in this specification. A graph claiming
conformance to the intrinsic validation contract MUST satisfy the
published SHACL shapes with RDFS entailment over this ontology and the
Scoped Statements Ontology. A conforming producer MAY
assert either membership direction; it is not required to materialize
both. A conforming consumer MUST treat
delta:hasChange and delta:inDelta as inverse
directions when it applies the OWL addendum or equivalent reference
materialization.
A conforming reference-constructor processor operates
on the Service Description carrier contract defined by this
specification. It MUST preserve default- versus named-graph position,
MUST implement the SPARQL 1.2 LANGDIR function, MUST apply
exact RDF 1.2 term equality, MUST emit deterministic change and target
IRIs, and MUST produce no delta graph for an ambiguous manifest or a
selected dataset containing unsupported RDF terms.
SHACL conformance establishes structural well-formedness only. It does not prove that external snapshots contain or omit any target quad, that a comparison was complete, or that two datasets have a particular relationship under an entailment regime.
RDF systems commonly need to exchange the result of comparing two graph or dataset states. A line-oriented file diff is sensitive to serialization, while an update language describes actions rather than a durable RDF resource that can carry provenance and be queried. The older Changeset vocabulary represents additions and removals through classic RDF reification and conventionally limits a change set to one described subject [[CHANGESET]]. RDF Patch supports scalable ordered dataset updates but is intentionally an operational format rather than an RDF ontology [[RDF-PATCH]].
This ontology supplies the missing small semantic layer: named dataset endpoints, first-class primitive changes, exact quad targets, and bidirectional membership. It is intended for RDF publishers, comparison processors, provenance systems, validation tooling, and higher-level change-management vocabularies.
The ontology owns descriptions of unordered structural differences between two identified RDF dataset snapshots. Its RDF and OWL semantics do not compute those differences. The reference constructor compares complete Service Description dataset manifests supplied in one active carrier dataset. The module does not prescribe blank-node matching, define comparison completeness, apply patches, order operations, or model proposals, decisions, branches, merges, releases, and conflict resolution.
A structural difference concerns asserted quad membership. A processor MUST NOT describe an entailed-only statement as a structural addition or removal unless the selected comparison regime first materializes that entailment into the compared snapshots. The regime itself belongs in a comparison or governance vocabulary.
The namespace is
https://ontology.inferal.com/modules/rdf-delta/ with
preferred prefix delta:.
| Vocabulary | Role |
|---|---|
| SPARQL Service Description | Dataset, default-graph, named-graph, logical graph-name, and graph-description semantics. |
| PROV-O | Entity identity, attribution, generation, derivation, and activities. |
| Inferal Scoped Statements | Exact subject, predicate, object, and optional graph-name targets. |
| RDF 1.2 | Optional graphless triple-term and rdf:reifies interoperability. |
The ontology deliberately does not import the historical Changeset vocabulary, RDF Patch, or the Inferal Sets Ontology. Their respective resource-description restriction, ordered execution model, and membership-occurrence contract do not match this module's compact structural identity.
| Construct | Represents | Does not imply |
|---|---|---|
| delta:DatasetDelta | An unordered structural difference between two snapshots. | Comparison completeness or executable patch order. |
| delta:Change | One exact quad transition in a delta. | That the target statement is asserted in the metadata graph. |
| delta:Addition | Target absent from baseline and present in result. | Why the quad appeared or who approved it. |
| delta:Removal | Target present in baseline and absent from result. | Retraction, falsity, or deprecation of the proposition. |
ss:QuadTarget | Exact RDF terms and optional graph name. | An assertion of the described triple. |
A delta:DatasetDelta is a persistent description of one
directional relationship between a baseline snapshot and a result
snapshot. It is a prov:Entity, not the activity that
compared the snapshots and not a mutable sequence of update
instructions. Swapping the endpoints reverses the meaning of every
primitive transition and therefore describes a different delta, even
if the same two snapshot resources are involved.
The ontology supplies no key or identity rule for deltas. Two
resources with equal endpoints and equal reported changes are not
thereby owl:sameAs. Publishers control delta IRIs and
SHOULD keep each IRI attached to the same ordered endpoint pair and
comparison meaning over its lifetime. Additional descriptions may
accumulate under RDF's open-world semantics, but they MUST NOT change
the identity of either endpoint or reverse an existing transition.
A comparison activity MAY be connected to the delta with PROV-O or a comparison-governance vocabulary. That activity may record software, time, agents, entailment regime, canonicalization, and coverage. Those facts qualify how the delta was obtained; they are not members of the structural delta itself.
Each delta:DatasetDelta identifies exactly one
delta:baselineDataset and exactly one
delta:resultDataset. Each endpoint represents an
sd:Dataset: one default graph and zero or more named
graphs [[SPARQL-SD]]. Use of either endpoint property also entails
that the endpoint is a prov:Entity. The endpoint
therefore identifies one immutable dataset snapshot whose asserted
quad membership is fixed for the lifetime of that resource.
A producer MUST use a different snapshot IRI when asserted quad
membership changes. An IRI for a mutable dataset service or continuing
dataset identity MUST NOT be used directly as an endpoint unless that
IRI is defined to denote one fixed snapshot. Snapshot entities MAY
use prov:specializationOf to identify the continuing
dataset and MAY carry generation, attribution, derivation, and time.
In this pattern, ex:liveDataset is the continuing
identity whose current content may change. The two specializations
are fixed snapshot entities and are suitable delta endpoints.
prov:generatedAtTime records when each snapshot entity
came into existence; it does not record when a later comparison ran.
Neither the timestamp nor prov:specializationOf proves
content completeness. The producer remains responsible for keeping
each snapshot IRI bound to fixed asserted quad membership and for
supplying a complete manifest to a closed-world comparison.
The two endpoint properties MAY identify the same snapshot only for an identity delta with no reported changes. Two different snapshot IRIs may nevertheless have equal asserted quad membership and produce an empty delta. Empty named-graph existence remains outside this ontology's quad-change model, so a snapshot identity may change for that reason without producing a primitive change.
Every delta:Change in the intrinsic SHACL contract MUST be classified as exactly one delta:Addition or delta:Removal and MUST identify exactly one delta:changeTarget. The OWL addendum declares the two primitive classes disjoint. A replacement is represented as one removal and one addition; higher-level claims that they form one conceptual replacement belong to a semantic-change vocabulary.
An addition or removal is relative to every delta that includes it. Reusing a change resource across multiple deltas therefore asserts that the same target has the stated membership transition for each associated baseline/result pair.
A target and primitive kind do not form a global identity key for a change. Independent change resources may describe the same quad transition, and the ontology does not infer that they are identical. Producers SHOULD normally mint change IRIs within the identity scope of one delta. They SHOULD reuse a change across deltas only when they deliberately assert the transition against every associated endpoint pair. The reference construction profile follows the safer local policy by deriving change IRIs from both the delta IRI and the quad.
The target's optional ss:graphTerm is part of quad
identity. Its absence denotes default-graph position; its presence
identifies the logical named graph. Consumers MUST compare graph
position as well as subject, predicate, and object. They MUST NOT
collapse equal triples from different graph positions into one
primitive change.
| Observed structural relation | Primitive delta representation | Not implied |
|---|---|---|
| Quad only in the result | One delta:Addition | Why it appeared or whether it was approved. |
| Quad only in the baseline | One delta:Removal | That its proposition is false or deprecated. |
| Same triple moves between graph positions | One removal from the old position and one addition to the new position | An ordered move operation. |
| One object value replaces another | One removal of the old quad and one addition of the new quad | That the two changes form one semantic replacement. |
| Quad occurs in both snapshots | No primitive change | Semantic equivalence of the snapshots. |
A higher-level vocabulary may group primitive changes as a move, rename, replacement, correction, or domain event. Such an interpretation refers to the primitive resources; it does not alter their structural meaning and is not inferred by this ontology.
delta:hasChange relates a delta to a change; delta:inDelta expresses the same membership from the change. The OWL addendum declares them inverse. Producers MAY assert either direction or both. Validators MUST accept either direction when evaluating the intrinsic contract and MUST NOT require redundant materialization merely for validation convenience.
Membership is set-like and unordered. Repeating the same triple does not create another occurrence, and neither membership direction supplies patch order. An application that needs repeated operations, ordering, or relation-level annotations must use an operational patch representation or qualified occurrence model outside this ontology.
A dataset delta MAY contain no changes, but zero published membership triples has more than one possible interpretation. The base ontology deliberately does not close that ambiguity.
| Available evidence | Safe conclusion |
|---|---|
| No reported members and no completeness claim | No changes are currently described; the comparison may be incomplete, unavailable, or still being published. |
| No reported members plus an external complete-comparison claim | No structural differences were observed under that declared comparison regime. |
| The same resource is both endpoint | The comparison is an identity comparison; emptiness is expected but is not entailed by OWL. |
| SHACL-conforming delta with no members | The description is structurally valid; SHACL conformance does not prove comparison completeness. |
Completeness, coverage, comparison regime, and failure status belong to provenance or comparison-governance metadata. Consumers MUST NOT interpret missing delta:hasChange or delta:inDelta statements as a closed-world assertion unless an external contract explicitly authorizes that interpretation.
| Construct | Question answered | Relationship to this ontology |
|---|---|---|
| Dataset delta | Which exact quads differ between these ordered snapshots? | The first-class entity defined here. |
| Comparison activity | Who compared what, when, with which algorithm and regime? | May generate or describe a delta through PROV-O or governance terms. |
| Patch program | Which ordered operations should a processor execute? | May be derived from or associated with a delta, but is not represented by unordered membership. |
| Semantic change | What domain meaning should be assigned to one or more primitive differences? | May group or interpret changes without replacing their structural targets. |
| Completeness or coverage claim | How much of the comparison was attempted successfully? | Qualifies whether absence of reported changes is informative. |
Producers SHOULD give snapshots, deltas, changes, and targets stable IRIs when those resources will be cited or enriched. They MUST preserve the ordered baseline/result roles, SHOULD keep change identity local to a delta, and SHOULD attach provenance to the delta or its generating activity rather than overloading primitive membership. Producers MAY publish only one membership direction.
Consumers MUST retain graph position, MUST treat addition and removal relative to the containing delta, and MUST NOT infer completeness, patch order, semantic equivalence, falsity, approval, or a compound domain event from the intrinsic graph alone. Consumers applying the OWL addendum MAY navigate either membership direction without requiring publishers to materialize both.
RDF 1.2 triple terms denote propositions and may be related to a reifier
through rdf:reifies [[RDF12-CONCEPTS]]. For a graphless
target, a producer MAY expose the same ss:QuadTarget
resource as an RDF 1.2 reifier using the Scoped Statements bridge. This
is an augmentation: the explicit subject, predicate, and object terms
remain the interoperable target representation.
Triple terms contain no graph-name slot. If ss:graphTerm is
present, consumers that need exact quad identity MUST retain it and MUST
NOT key changes only by the RDF 1.2 triple term. The RDF Delta model,
through ss:QuadTarget, permits either an IRI or blank-node
graph name as RDF 1.2 does. The reference constructor is deliberately
narrower and accepts only IRI logical graph names so that it can derive
stable cross-snapshot keys without an undeclared blank-node identity
regime.
This section defines one interoperable operational profile for producing the semantic model above. It is not the definition of a dataset delta: publishers may obtain conforming deltas through other comparison processes, provided that their output preserves the same endpoint, primitive-change, target, membership, and open-world meanings.
SPARQL evaluates a query over one active RDF dataset [[SPARQL11-QUERY]].
Because RDF datasets do not nest, the reference constructor accepts a
carrier dataset. Its default graph is a control graph
containing the delta request and two sd:Dataset manifests.
The manifests preserve each snapshot's default graph, named graph
names, and graph descriptions using the W3C Service Description
vocabulary [[SPARQL-SD]].
The constructor uses the SPARQL 1.2 LANGDIR function
[[SPARQL12-QUERY]] so directional language literals participate in RDF
1.2 term identity. A conforming reference-constructor processor MUST
implement that function.
Within this carrier contract, each sd:Graph description IRI
also names the carrier graph containing that described graph's triples.
For a named graph, sd:name is the original logical graph
name and MUST be copied to ss:graphTerm. The
sd:graph value selects storage only and MUST NOT become the
target graph name. A default-graph target omits
ss:graphTerm.
The delta and endpoint resources MUST be IRIs. Each request MUST have
exactly one baseline and one result. Each endpoint MUST be an
immutable sd:Dataset snapshot and
prov:Entity with exactly one IRI-valued
sd:defaultGraph. Each listed sd:NamedGraph
MUST have exactly one IRI-valued sd:name and exactly one
IRI-valued sd:graph. Logical graph names MUST be unique
within each dataset manifest.
Each selected manifest MUST be complete for the snapshot's asserted
quad membership: it MUST list every compared graph position, and each
carrier graph MUST contain every asserted triple in that position.
Only under that local input contract may the constructor treat
absence from a carrier graph as absence from the snapshot. This
closed-manifest assumption does not change the global open-world
meaning of sd:Dataset.
Service Description types MAY be asserted or supplied by RDFS
entailment from these structural properties. The constructor MUST NOT
require the corresponding rdf:type triples to have been
materialized in the control graph.
The active default graph MUST be the control graph. A processor MUST NOT use a union-default view that exposes carrier graph content as control triples. A carrier graph with no triples represents an empty graph for quad comparison; this ontology does not represent empty graph existence as an independent change.
The constructor normalizes both manifests into graph-position, subject, predicate, and object tuples. The graph-position component distinguishes the default graph from every logical named graph. A quad occurring only in the baseline becomes a delta:Removal; a quad occurring only in the result becomes an delta:Addition; a quad occurring in both produces no change. Moving a triple between graphs consequently produces one removal and one addition.
Exact keys include graph position, literal lexical form, datatype,
case-insensitive language tag, and directional language-literal base
direction. No entailment regime is applied to snapshot contents.
Change and target IRIs are SHA-256-derived from the delta IRI and a
length-prefixed quad key, so repeated execution over the same supported
input is stable.
The projection constructs both membership directions and the complete
ss:QuadTarget decomposition.
The reference SPARQL 1.2 constructor accepts IRI subjects and IRI or literal objects. A blank node, RDF 1.2 triple term, or another unsupported term anywhere in either described dataset causes that complete request to produce no output. Producers SHOULD skolemize or canonicalize blank nodes under an explicitly declared comparison regime before invoking this projection.
Ambiguous endpoints, default graphs, named-graph components, duplicate logical names, or non-IRI graph values also produce no output. This avoids presenting a partial result as a complete or empty delta. Operational systems SHOULD surface rejection diagnostics separately.
This example is a valid change-free description, but its RDF alone does not establish that a comparison ran to completion. A provenance or governance contract must supply that evidence before a consumer treats the missing membership statements as an exhaustive result.
The intrinsic SHACL contract requires exactly one baseline and result
endpoint that is both an sd:Dataset and a
prov:Entity, exactly one quad target for each change,
exactly one primitive change classification, and membership in at
least one delta. It rejects reported changes when both endpoint
properties use the same snapshot IRI. The
membership paths accept asserted delta:hasChange, asserted
delta:inDelta, or both.
The constructor input SHACL contract separately requires one default carrier graph per endpoint, one logical name and carrier graph per named-graph description, IRI-valued carrier and logical graph names, and unique logical graph names within a dataset. Its constraints follow only endpoint manifests selected by a constructor request; unrelated Service Description resources in the control graph are outside that request's validation scope. These are closed-world requirements for the reference projection, not new global meanings for Service Description terms. The contract is query-specific and is not a standalone profile of Service Description or this ontology.
The validation graph does not dereference snapshots or compare their contents. A validator therefore cannot prove that additions were absent from the baseline, removals were absent from the result, or a reported delta is complete. It also cannot prove that a manifest omitted no external graph or triple. Manifest completeness is a producer precondition; additions, removals, and comparison completeness are processor and provenance claims.
RDFS domains and ranges infer types; they are not input filters. The OWL
addendum entails the opposite membership direction and entails that no
individual can consistently be both an addition and a removal. It does
not impose cardinalities, assert endpoint contents, or infer changes
from missing triples. Use of delta:baselineDataset or
delta:resultDataset entails that the endpoint is an
sd:Dataset and a prov:Entity. These range
entailments describe fixed endpoint identity; they do not prove
manifest completeness. Consumers are not required to materialize
inverse triples unless their exchange contract says otherwise.
RDFC-1.0 provides a standardized dataset canonicalization algorithm and explicitly identifies dataset comparison and communicating change sets as use cases [[RDF-CANON]]. Canonicalization is recommended when blank nodes must be compared across serializations, while recognizing that a graph change can alter canonical identifiers for nearby blank nodes.
The early W3C Delta design distinguishes insertion, deletion, weak, and strong graph deltas [[DELTA-DESIGN]]. This ontology adopts the primitive insertion/deletion insight but does not adopt N3 quoted-formula syntax or claim context-independent patch applicability.
The Inferal Artifact Evolution Ontology can qualify an RDF delta with a governed artifact, immutable artifact versions, a comparison activity, a declared comparison regime, and an explicit coverage status. The two ontologies remain independent: this ontology does not import Artifact Evolution. No class in either vocabulary is globally equivalent to or a subclass of its similarly named counterpart, and no property is globally equivalent to or a subproperty of its similarly named counterpart.
| RDF Delta construct | Artifact Evolution construct | Composition boundary |
|---|---|---|
| delta:DatasetDelta | ae:ChangeSet | May be the same resource only when it satisfies both endpoint, generation, artifact, and validation contracts. |
| delta:Change | ae:RealizedChange | May be the same resource when one observed artifact change is exactly one primitive quad transition. |
| delta:Addition or delta:Removal | ae:Addition or ae:Removal | The RDF Delta terms are classes; the Artifact Evolution terms are SKOS change-kind individuals. |
| delta:baselineDataset and delta:resultDataset | ae:baselineVersion and ae:resultVersion | The same endpoint resources may be used only when the artifact versions are themselves the compared RDF dataset snapshots. |
| Delta membership | ae:hasChange | The properties are distinct and must be asserted or entailed under their own vocabulary contracts. |
Using ae:generatedChangeSet to identify an RDF delta
entails through its range that the delta is also an
ae:ChangeSet. A producer that uses this direct pattern
MUST satisfy both ontologies. In particular, the Artifact Evolution
baseline and result MUST be distinct versions of the same governed
artifact, the comparison and change set MUST identify each other,
and the comparison MUST declare its regime and coverage. A
same-endpoint RDF identity delta therefore cannot use this direct
pattern, although distinct artifact-version snapshots with equal
asserted quads can form an empty dual-typed change set.
The example makes each contract visible instead of relying on
local-name similarity. The change is an instance of the
delta:Addition class and separately carries the
ae:Addition change-kind individual. The target is shared
because ss:QuadTarget satisfies Artifact Evolution's
exact statement-target range. Both membership predicates are
asserted because neither ontology entails the other.
A producer SHOULD keep the resources separate when Artifact Evolution
groups, interprets, or otherwise changes the granularity of primitive
quad transitions. For example, one label replacement is one removal
plus one addition in RDF Delta but may be one
ae:Modification in an interpreted change set. The
comparison may generate both entities, and the interpreted change set
may record derivation from the structural delta.
In both patterns, coverage qualifies what the declared comparison
regime completed. ae:CompleteCoverage does not claim
universal semantic equivalence and does not change the structural
meaning of RDF Delta additions or removals.
Service Description is reused only for dataset composition. The carrier
contract's requirement that an sd:Graph description IRI also
select a graph in the active carrier dataset is an operational input
convention; it does not redefine sd:Graph globally.
Delta metadata may expose removed facts, historical identifiers, named graph structure, or sensitive values no longer present in a current dataset. Publishers SHOULD apply access control and retention policy to delta resources independently of the result snapshot. Consumers SHOULD treat external snapshot and provenance links as untrusted inputs and SHOULD bound the cost of canonicalization for adversarial blank-node structures.
Public IRIs in this namespace are intended to remain stable after adoption. Extensions SHOULD specialize delta:Addition or delta:Removal when they remain primitive quad transitions. Semantic replacements, renames, moves, validation changes, and other interpretations SHOULD be modeled in a higher-level vocabulary that refers to one or more primitive changes.
| Term | Kind | Normative role |
|---|---|---|
delta:DatasetDelta | Class | Possibly empty structural difference between baseline and result snapshots. |
delta:Change | Class | One exact quad transition included in a delta. |
delta:Addition | Class | Target absent from baseline and present in result. |
delta:Removal | Class | Target present in baseline and absent from result. |
delta:baselineDataset | Object property | Starting immutable snapshot, entailed to be an sd:Dataset and prov:Entity. |
delta:resultDataset | Object property | Resulting immutable snapshot, entailed to be an sd:Dataset and prov:Entity. |
delta:changeTarget | Object property | Exact non-asserting ss:QuadTarget affected by a change. |
delta:hasChange | Object property | Delta-to-change membership direction. |
delta:inDelta | Object property | Change-to-delta membership direction, inverse of delta:hasChange. |