How can I see which quad storages exist and in which quad storage a graph resides?

Let's take for example a Linked Data (RDF) View created from relational data in Virtuoso. The RDF output should have two graphs which reside in a quad storage named, for example --


The RDF is also accessible through the SPARQL endpoint with a query like --

DEFINE input:storage <http://localhost:8890/rdfv_demo/quad_storage/default>
    ?s ?p ?o 

One might ask, is there a way to tell Virtuoso (once) that the quad storage should always be included in all queries to the SPARQL endpoint, such that the user does not have to define the input:storage explicitly in each query?


All metadata about all RDF storages are kept in "system" graph <> (with built-in, predefined namespace prefix, virtrdf:). Subjects of type virtrdf:QuadStorage are RDF storages. There are three of them by default:

SQL> SPARQL SELECT * FROM virtrdf: WHERE { ?s a virtrdf:QuadStorage };

3 Rows. -- 3 msec.

  • virtrdf:DefaultQuadStorage is used if no input:storage is specified.
  • virtrdf:DefaultServiceStorage is used for SPARQL Federation.
  • virtrdf:SyncToQuads is used to keep the list of Linked Data Views that are translated into RDB2RDF triggers.

There are two ways of using one of these Linked Data Views in SPARQL endpoint without making a define input:storage declaration.

  • Create a Linked Data View right in virtrdf:DefaultQuadStorage; or add the view in other storage, and then copy it from there to virtrdf:DefaultQuadStorage. In either case, use:

    SPARQL ALTER QUAD STORAGE virtrdf:DefaultQuadStorage . . .

  • Use SYS_SPARQL_HOST table as described here, and set SH_DEFINES so it contains your favorite define input:storage.