<docbook><section><title>VirtTipsAndTricksDeleteSpecificTriplePatternAcrossGraphs</title><para> </para>
<title>How Can I Delete a Specific Triple Across Graphs?</title>How Can I Delete a Specific Triple Across Graphs?
<para> <emphasis>Suppose the following situation</emphasis>:</para>
<itemizedlist mark="bullet" spacing="compact"><listitem>There is a specific triple somewhere in a massive dataset in a Virtuoso DBMS.
</listitem>
<listitem>There are too many possible named graphs associated with the pattern so <emphasis>SPARQL DELETE</emphasis> (which requires <emphasis>FROM i.e., Named Graph</emphasis> scoping) isn&#39;t adequate.</listitem>
</itemizedlist><emphasis>What is the solution?</emphasis><para>Using SQL you can execute the following: </para>
<programlisting>SQL&gt; SPARQL
DELETE FROM rdf_quad 
WHERE s = iri_to_id (&#39;http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen&#39;) 
  AND o = iri_to_id (&#39;http://purl.org/ontology/bibo/Document&#39;) 
  AND p = iri_to_id (&#39;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&#39;);
</programlisting><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtTipsAndTricksGuide">Virtuoso Tips and Tricks Collection</ulink> </listitem>
</itemizedlist></section></docbook>