Adding identifiers to each quad



I’d like to extend the RDF Dataset data model with an identifier for each quad. Purpose is to implement more straightforward reification and through that better support attributed graphs and property graph style modelling.

Since Virtuoso under the hood is based on an RDBMS it probably already provides an identifier for each quad (as in my understanding most relational databases do).
Assuming that it does indeed would it be possible to access that identifier, make it available to SPARQL queries, build an additional index from identifier to quad etc?



It is not recommended such changes be made to the Virtuoso RDF Quad Store without consultancy assistance from OpenLink as indicated in this FAQ.

Note also the following articles on reification in relation to Virtuoso:


Hi Thomas,

As a Quad Store Virtuoso already indexes Named Graph IRIs. Thus, if you stick to the notion of a Named Graph IRI as the 4th element of a Quad you will have the desired benefit of indexing on triples grouped by Named Graph.

Sample SPARQL Query that leverages Quad Indexing

        GRAPH ?g {?s ?p ?o} 


@kidehen Of course, but I’d still like to be able to identify specific statements in specific contexts. Grouping and attribution of statements are sometimes orthogonal activities. Although it can all be done with quads (or triples, or even doubles) I’d like to optimize for it with quints.


@hwilliams thanks for the pointers!


Okay, once you take the quints route you are exiting the core design of Virtuoso; i.e., you are seeking customization of the core product.

You can handle reification by using terms from the RDF Core Ontology; i.e., simply describe rdfs:Statement instances. Note: there are many instances out in the wild that do without issue, including Uniprot from our live LOD Cloud Cache instance that hosts 30 Billion+ RDF Statements.