The evolution of RDF and the related technologies fuelled by the need to make statements about statements.
RDF* ("RDF star") is an extension of the RDF standard that adds support for embedded (or nested) statements. RDF* statements that include nested statements, or statements about statements, are extensions of basic RDF triples and can be thought of as meta-statements or metadata in relation to the embedded statements.
In RDF*, the role of meta-statements is similar to that of edge properties in property graphs: statements about statements add additional information about existing edges in the graph and therefore act as statement-level annotations. This provides a more convenient way of modelling and storing complex relationships and is useful for expressing various kinds of metadata such as information about data provenance.
In traditional RDF, statements can only connect two entities (nodes) or one node and one literal value at a time. Because the subject of an RDF triple is always a node, the standard does not allow "chaining" of statements or adding a statement that "branches out" from another statement. This can be seen as a limitation of the traditional RDF data model, as it does not provide the means to simply refer to an existing statement within another statement. For example, while the fact that Alice is friends with Bob can be easily modelled using a single RDF triple:
:Alice :friendsWith :Bob .
additional information about their friendship, e.g. its start date, can only be "attached" when the friendship "exists" as a node:
:friendship0 :person :Alice ;
:person :Bob .
:friendship0 :startDate "2020" .
RDF* natively supports meta-statements, or statements about statements, and can be used to store the start date of Alice and Bob's friendship more succinctly compared to RDF:
<<:Alice :friendsWith :Bob>> :startDate "2020" .
There are many kinds of metadata that, thanks to RDF*, can be conveniently captured at the level of individual statements. These include various score values such as edge weights as well as statement-level provenance information:
:Alice :friendsWith :Bob .
<<:Alice :friendsWith :Bob>> :relevance "10" .
<<:Alice :friendsWith :Bob>> :dateCreated "2005" .
<<:Alice :friendsWith :Bob>> :source <http://example.com/> .
Just as RDF* extends RDF to include support for embedded statements, Turtle* and SPARQL* represent the evolution of the corresponding data serialisation and querying technologies used with RDF/RDF*.
For example, in Turtle*, embedded statements are written inside a pair of <<
>>
, as in the following example:
<<:Alice :friendsWith :Bob>> :startDate "2020" .
:Alice :knows <<:Bob :friendsWith :Carol>> .
Interestingly, since RDF* supports multiple levels of nesting, a statement about a statement about a statement (statement meta-metadata) can be written in Turtle* as follows:
<<<<:Alice :friendsWith :Bob>> :startDate "2020">> :source <http://example.com/> .
Thanks for stopping by my digital playground! If you want to say hi, you can reach out to me on LinkedIn or via email. I'm always keen to chat and connect.
If you really-really like my work, you can support me by buying me a coffee.