iSPARQL Querying Tutorial with SPARQL Query type "DELETE"

This tutorial shows how to execute a SPARQL query with type "DELETE".

Enter and execute a query

  1. Go to http://cname/isparql, for ex: http://id.myopenlink.net/isparql
  2. The iSPARQL initialization window will be shown:



  3. On successful initialization will be presented the iSPARQL Advanced tab open with a default SPARQL query:

    SELECT * WHERE {?s ?p ?o}





  4. Go to QBE tab:



  5. Click the Clear Pane icon on the toolbar to empty the Canvas.







  6. Change the Data Source URI field value on the QBE tab for ex. to http://mytest.com. This will be the Graph URL we are going to use in our tutorial.



  7. Make sure the steps from the iSPARQL Insert Query Tutorial are performed.
  8. From the QBE tab change the "Query Option Type" to DELETE.



  9. Click the Generate icon on the QBE toolbar.
  10. The Advanced tab will open, with the produced SPARQL Query shown in the text-area:



  11. We are going to modify the query by adding the triples which we want to be deleted from the local Named Graph, http://mytest.com. Add (cut-and-paste) the following to the query:

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





  12. Click the Run Query icon on the Advanced toolbar.
  13. In the Result sub-tab, you should see a message confirming successful deletion of 2 triples:



  14. To check what triples are now found in the http://mytest.com Named Graph, click to the Advanced tab.
  15. Enter the following into the SPARQL Query text-area:

    SELECT ?s ?p ?o FROM <http://mytest.com> WHERE { GRAPH <http://mytest.com> { ?s ?p ?o } }





  16. Click the Run Query icon on the Advanced toolbar.
  17. You should see that only 1 triple is now found in the http://mytest.com Named Graph.



Related


Referenced by...