You are here:
/ Dashboard / Main / InteractiveSparqlQueryBuilder / InteractiveSparqlQueryBuilderQueryTutorialDelete

iSPARQL Querying Tutorial with SPARQL Query type "DELETE"

In this tutorial we will show how to execute a SPARQL query with type "DELETE".

Enter a query and execute

  1. Go to iSPARQL demo page.
  2. Click "Ok" in the shown Login form. By default should be shown user name demo and password demo.
  3. As result will be shown the iSPARQL home page, with opened tab "QBE" and default graph elements will be shown in the Canvas. Click the "Clear Pane" icon form the toolbar in order to empty the Canvas.
  4. Change the "Data Source URI" field value from the QBE tab to: http://mytest.com as this is the Graph URL we are going to use in our tutorial.
  5. Before showing how to delete triples, we will insert some data into the http://mytest.com Graph.
    1. From QBE tab, change the "Type" to INSERT, shown bellow the Canvas.
    2. Change also the value from the drop-down list "Get Remote Data when Missing Locally" to "Get Local Data Only".
    3. Click the "Generate" icon form the QBE toolbar.
    4. As result will be opened the Advanced tab with the produced SPARQL Query shown in the text-area.
    5. We are going to modify the query by adding the values which we want to be inserted in the local Graph http://mytest.com. Add to the query the following items:

      <s1> <p1> <o1> . <s2> <p2> <o2> . <s3> <p3> <o3>

    6. Click the "Run Query" icon from the Advanced toolbar.
    7. As result will be shown message for the successfully inserted 3 triples:
  6. Go to the QBE tab.
  7. Change the Type to DELETE.
  8. Click the "Generate" icon form the QBE toolbar.
  9. As result will be opened the Advanced tab with the produced SPARQL Query shown in the text-area.
  10. We are going to modify the query by adding the triples which we want to be deleted from the local graph http://mytest.com. Add to the query the following items:

    <s1> <p1> <o1> . <s2> <p2> <o2>

  11. Click the "Run Query" icon from the Advanced toolbar.
  12. As result in the Result sub-tab will be shown message for the successfully deleted 2 triples:
  13. Now let's check what triples contains the Graph with URL http://mytest.com. Go to the Advanced tab.
  14. Enter in the "SPARQL Query" text-area the following statement:

    select ?s ?p ?o from <http://mytest.com> where { graph <http://mytest.com> { ?s ?p ?o } }

  15. Click the "Run Query" icon from the Advanced toolbar.
  16. As result in the Result sub-tab will be shown 1 triple found in the graph with URL http://mytest.com:

References

Virtuoso and the Virtuoso Website are Copyright (C) OpenLink Software 2006-
SourceForge.net Logo