Virtuoso support for RDF-Star and SPARQL-Star

Hi all,

Virtuoso doesn’t seem to support RDF* and SPARQL* at the moment. Is there any plan to change this in future? I have datasets that use reification widely, and this star approach would be pretty useful to me.

1 Like

Hi @mbrandizi,

Our current position regarding RDF* and SPARQL* is that neither approach offers tangible value to the goal of describing statements (or claims) expressed via Entity Relationship Graphs i.e., the functionality covered by RDF Reification.

Virtuoso already provides a demonstrably scalable solution to the RDF Reification Issue, despite misconceptions about its syntactic verbosity (the driving force behind the RDF-Star, SPARQL-Star, Turtle-Star, JSON-LD-Start Syntax Sugar effort).

Related Links

Hi @kidehen,

thank you for your answer. Personally, I’m fine with the rdf: vocabulary most of the times, however, I’m under the impression that the -star extensions might become a standard, in which case its support would be motivated by the will to support standards.

Maybe, a good way to support that could be translating -star syntax into something like patterns based on rdf: reification.

Hi @mbrandizi,

I don’t believe it will become a standard due to many challenges that is has with regards to semantic clarity.

At the very best, it will be a suggest “syntax sugar” for translating to RDF Reification.

Kingsley

1 Like

Hi @kidehen,
Semantic clarity is not an issue: see the RDF-star Final Community Group Report. Moving Virtuoso towards RDF-star is a true added value.

1 Like

Ultimately, if RDF-Star becomes an official W3C standard it will be supported in Virtuoso. That isn’t the case at the current time.

The great thing about the W3C standardization process is that it involves thorough peer-review by domain experts.

@GenEars, @mbrandizi,

I’ve read the report.

In terms of the original example that RDF* was proposed on, I recently started creating these kinds or triples using the shorthand for RDF Collections. Is there something that RDF-Star provides, that isn’t applicable using this method?

Original RDF-Star Example

:bob foaf:name "Bob".
 <<:bob foaf:age 23>> dct:creator <http://example.com/crawlers#c1> ;
                      dct:source <http://example.net/listing.html> .

RDF Collection Example #1

@prefix <#>.
(:bob foaf:age "23") dct:creator <http://example.com/crawlers#c1> ;
                     dct:source <http://example.net/listing.html> .

Query Example

PREFIX : <#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT *
FROM <urn:rdf:collections:demo>
WHERE
     {
      (:bob foaf:age "23") dct:creator ?creator.
     }

RDF Collection Example #2

@prefix <#>.
:bob foaf:age ("23" [
                      dct:creator <http://example.com/crawlers#c1> ;
                      dct:source <http://example.net/listing.html> 
                     ]).

Query Example

RDF Collection Example #3 (Weighted Degree Centrality)

@prefix <#>.

(:A foaf:knows :B) :weight "0.5"^^xsd:float.
(:B foaf:knows :C) :weight "0.15"^^xsd:float.
(:B foaf:knows :D) :weight ".015"^^xsd:float.
(:A foaf:knows :E) :weight  ".19"^^xsd:float.
(:F foaf:knows :A) :weight  ".8"^^xsd:float.

Query Example

# Weighted Degree Centrality 
PREFIX : <#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT
    ?person1
    SUM(?weight) as ?wdc
FROM <urn:rdf:collections:demo>
WHERE
     {
       (?person1 foaf:knows ?person2) :weight ?weight.
     }

ORDER BY DESC(?wdc)

OR

@prefix <#>.

:A foaf:knows (:B [ :weight "0.5"^^xsd:float ]).
:B foaf:knows (:C [ :weight "0.15"^^xsd:float ]).
:B foaf:knows (:D [:weight ".015"^^xsd:float]).
:A foaf:knows (:E [:weight  ".19"^^xsd:float]).
:F foaf:knows (:A [:weight  ".8"^^xsd:float]).

Query Example

# Weighted Degree Centrality
PREFIX : <#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT
    ?person1
    SUM(?weight) as ?wdc
FROM <urn:rdf:collections:demo>
WHERE
     {
       ?person1 foaf:knows (?person2 [:weight ?weight]).
     }

ORDER BY DESC(?wdc)

OR

@prefix <#>.

:A foaf:knows (:B :weight "0.5"^^xsd:float ).
:B foaf:knows (:C :weight "0.15"^^xsd:float ).
:B foaf:knows (:D :weight ".015"^^xsd:float).
:A foaf:knows (:E :weight  ".19"^^xsd:float).
:F foaf:knows (:A :weight  ".8"^^xsd:float).

Query Example

# Weighted Degree Centrality

PREFIX : <#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT
    ?person1
    SUM(?weight) as ?wdc
FROM <urn:rdf:collections:demo>
WHERE
     {
       ?person1 foaf:knows (?person2 :weight ?weight).
     }

ORDER BY DESC(?wdc)

Dataset

SPARQL INSERT

PREFIX : <#>
PREFIX dct: <http://purl.org/dc/terms/>

INSERT INTO GRAPH <urn:rdf:collections:demo>

    {
        (:bob foaf:age "23") dct:creator <http://example.com/crawlers#c1> ;
                            dct:source <http://example.net/listing.html> .

        :bob foaf:age ("23" [
                            dct:creator <http://example.com/crawlers#c1> ;
                            dct:source <http://example.net/listing.html> 
                            ]).

        (:A foaf:knows :B) :weight "0.5"^^xsd:float.
        (:B foaf:knows :C) :weight "0.15"^^xsd:float.
        (:B foaf:knows :D) :weight ".015"^^xsd:float.
        (:A foaf:knows :E) :weight  ".19"^^xsd:float.
        (:F foaf:knows :A) :weight  ".8"^^xsd:float.


        :A foaf:knows (:B [ :weight "0.5"^^xsd:float ]).
        :B foaf:knows (:C [ :weight "0.15"^^xsd:float ]).
        :B foaf:knows (:D [:weight ".015"^^xsd:float]).
        :A foaf:knows (:E [:weight  ".19"^^xsd:float]).
        :F foaf:knows (:A [:weight  ".8"^^xsd:float]).

        :A foaf:knows (:B :weight "0.5"^^xsd:float ).
        :B foaf:knows (:C :weight "0.15"^^xsd:float ).
        :B foaf:knows (:D :weight ".015"^^xsd:float).
        :A foaf:knows (:E :weight  ".19"^^xsd:float).
        :F foaf:knows (:A :weight  ".8"^^xsd:float).
    }

RDF-TURTLE

## TURTLE START ##
@prefix : <#>.
@prefix dct: <http://purl.org/dc/terms/>.

        (:bob foaf:age "23") dct:creator <http://example.com/crawlers#c1> ;
                            dct:source <http://example.net/listing.html> .

        :bob foaf:age ("23" [
                            dct:creator <http://example.com/crawlers#c1> ;
                            dct:source <http://example.net/listing.html> 
                            ]).

        (:A foaf:knows :B) :weight "0.5"^^xsd:float.
        (:B foaf:knows :C) :weight "0.15"^^xsd:float.
        (:B foaf:knows :D) :weight ".015"^^xsd:float.
        (:A foaf:knows :E) :weight  ".19"^^xsd:float.
        (:F foaf:knows :A) :weight  ".8"^^xsd:float.


        :A foaf:knows (:B [ :weight "0.5"^^xsd:float ]).
        :B foaf:knows (:C [ :weight "0.15"^^xsd:float ]).
        :B foaf:knows (:D [:weight ".015"^^xsd:float]).
        :A foaf:knows (:E [:weight  ".19"^^xsd:float]).
        :F foaf:knows (:A [:weight  ".8"^^xsd:float]).

        :A foaf:knows (:B :weight "0.5"^^xsd:float ).
        :B foaf:knows (:C :weight "0.15"^^xsd:float ).
        :B foaf:knows (:D :weight ".015"^^xsd:float).
        :A foaf:knows (:E :weight  ".19"^^xsd:float).
        :F foaf:knows (:A :weight  ".8"^^xsd:float).

## TURTLE END ##

Additional Output Examples

1 Like