Virtuoso SPARQL 1.1. CREATE Usage Examples

What?

This guide contains Virtuoso SPARQL 1.1. CREATE Usage examples queries which you can run against any SPARQL endpoint that supports SPARQL 1.1 and the ability to allow a verified user perform INSERT operations.

Why?

Use to add a named graph in the RDF Quad Store.

How?

Here are some examples showcasing Virtuoso's support for this functionality:

CREATE Example

This example creates named graph identified by the IRI <urn:sparql:tests:create:data> :

  1. Assume the following Raw Data Representation in Turtle:

    <#book1> <#price> 41 . <#book2> <#price> 42 . <#book3> <#price> 43 . <#book4> <#price> 44 .

  2. Create a named graph identified by the IRI <urn:sparql:tests:create:data> :

    CREATE GRAPH <urn:sparql:tests:create:data>;

  3. Load the sample data:

    INSERT DATA { GRAPH <urn:sparql:tests:create:data> { <#book1> <#price> 41 . <#book2> <#price> 42 . <#book3> <#price> 43 . <#book4> <#price> 44 . } }

  4. Query <urn:sparql:tests:create:data> graph data:

    SELECT * FROM <urn:sparql:tests:create:data> WHERE { ?s ?p ?o }

Related