Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 441

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="Function: DB.DBA.RDF_GRAPH_DIFF - Virtuoso Functions Guide" />
  <meta name="dc.subject" content="Function: DB.DBA.RDF_GRAPH_DIFF - Virtuoso Functions Guide" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href="functions.html" title="Chapter Contents" />
  <link rel="prev" href="appendixa.html" title="Appendix" />
  <link rel="next" href="functions.html#.html" title="" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>Function: DB.DBA.RDF_GRAPH_DIFF - Virtuoso Functions Guide</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="fn_rdf_graph_diff" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>22. Virtuoso Functions Guide - DB.DBA.RDF_GRAPH_DIFF</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="functions.html">Chapter Contents</a> | <a class="link" href="fn_rdf_graph_collect_fp_list.html" title="DB.DBA.RDF_GRAPH_COLLECT_FP_LIST">Prev</a> | <a class="link" href="fn_rdf_suo_apply_patch.html" title="DB.DBA.RDF_SUO_APPLY_PATCH">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div>
      <a class="selected" href="functions.html">Virtuoso Functions Guide</a>
   </div>
    <br />
   <div>
      <a href="functions.html#admin">Administration</a>
   </div>
   <div>
      <a href="functions.html#aggr">Aggregate Functions</a>
   </div>
   <div>
      <a href="functions.html#array">Array Manipulation</a>
   </div>
   <div>
      <a href="functions.html#bpel">BPEL APIs</a>
   </div>
   <div>
      <a href="functions.html#backup">Backup</a>
   </div>
   <div>
      <a href="functions.html#compression">Compression</a>
   </div>
   <div>
      <a href="functions.html#cursors">Cursor</a>
   </div>
   <div>
      <a href="functions.html#time">Date &amp; Time Manipulation</a>
   </div>
   <div>
      <a href="functions.html#debug">Debug</a>
   </div>
   <div>
      <a href="functions.html#dict">Dictionary Manipulation</a>
   </div>
   <div>
      <a href="functions.html#encoding">Encoding &amp; Decoding</a>
   </div>
   <div>
      <a href="functions.html#file">File Manipulation</a>
   </div>
   <div>
      <a href="functions.html#ft">Free Text</a>
   </div>
   <div>
      <a href="functions.html#hash">Hashing / Cryptographic</a>
   </div>
   <div>
      <a href="functions.html#ldap">LDAP</a>
   </div>
   <div>
      <a href="functions.html#localization">Locale</a>
   </div>
   <div>
      <a href="functions.html#mail">Mail</a>
   </div>
   <div>
      <a href="functions.html#misc">Miscellaneous</a>
   </div>
   <div>
      <a href="functions.html#number">Number</a>
   </div>
   <div>
      <a href="functions.html#phrz">Phrases</a>
   </div>
   <div>
      <a class="selected" href="functions.html#rdf">RDF data</a>
   </div>
   <div class="selected">
    <div>
        <a href="fn_rdf_64bit_upgrade.html">db.dba.rdf_64bit_upg...</a>
    </div>
    <div>
        <a href="fn_rdf_audit_metadata.html">db.dba.rdf_audit_met...</a>
    </div>
    <div>
        <a href="fn_rdf_backup_metadata.html">db.dba.rdf_backup_me...</a>
    </div>
    <div>
        <a href="fn_rdf_convert_rdfxml_to_ttl.html">db.dba.rdf_convert_r...</a>
    </div>
    <div>
        <a href="fn_rdf_datatype_of_obj.html">db.dba.rdf_datatype_...</a>
    </div>
    <div>
        <a href="fn_rdf_graph_collect_fp_list.html">db.dba.rdf_graph_col...</a>
    </div>
    <div>
        <a class="selected" href="fn_rdf_graph_diff.html">db.dba.rdf_graph_dif...</a>
    </div>
    <div>
        <a href="fn_rdf_graph_group_create.html">db.dba.rdf_graph_gro...</a>
    </div>
    <div>
        <a href="fn_rdf_graph_group_ins.html">db.dba.rdf_graph_gro...</a>
    </div>
    <div>
        <a href="fn_rdf_langmatches.html">db.dba.rdf_langmatch...</a>
    </div>
    <div>
        <a href="fn_rdf_load_rdfa.html">db.dba.rdf_load_rdfa</a>
    </div>
    <div>
        <a href="fn_rdf_load_rdfxml.html">db.dba.rdf_load_rdfx...</a>
    </div>
    <div>
        <a href="fn_rdf_load_rdfxml_mt.html">db.dba.rdf_load_rdfx...</a>
    </div>
    <div>
        <a href="fn_rdf_quad_uri.html">db.dba.rdf_quad_uri</a>
    </div>
    <div>
        <a href="fn_rdf_quad_uri_l.html">db.dba.rdf_quad_uri_...</a>
    </div>
    <div>
        <a href="fn_rdf_quad_uri_l_typed.html">db.dba.rdf_quad_uri_...</a>
    </div>
    <div>
        <a href="fn_rdf_regex.html">db.dba.rdf_regex</a>
    </div>
    <div>
        <a href="fn_rdf_restore_metadata.html">db.dba.rdf_restore_m...</a>
    </div>
    <div>
        <a href="fn_rdf_suo_apply_patch.html">db.dba.rdf_suo_apply...</a>
    </div>
    <div>
        <a href="fn_rdf_suo_diff_ttl.html">db.dba.rdf_suo_diff_...</a>
    </div>
    <div>
        <a href="fn_rdf_triples_to_rdf_xml_text.html">db.dba.rdf_triples_t...</a>
    </div>
    <div>
        <a href="fn_rdf_triples_to_ttl.html">db.dba.rdf_triples_t...</a>
    </div>
    <div>
        <a href="fn_rdf_ttl2hash.html">db.dba.rdf_ttl2hash</a>
    </div>
    <div>
        <a href="fn_rdf_void_store.html">db.dba.rdf_void_stor...</a>
    </div>
    <div>
        <a href="fn_sparql_eval.html">db.dba.sparql_eval</a>
    </div>
    <div>
        <a href="fn_sparql_eval_to_array.html">db.dba.sparql_eval_t...</a>
    </div>
    <div>
        <a href="fn_sparql_rdb2rdf_codegen.html">db.dba.sparql_rdb2rd...</a>
    </div>
    <div>
        <a href="fn_sparql_rdb2rdf_list_tables.html">db.dba.sparql_rdb2rd...</a>
    </div>
    <div>
        <a href="fn_sparql_rexec.html">db.dba.sparql_rexec</a>
    </div>
    <div>
        <a href="fn_sparql_rexec_to_array.html">db.dba.sparql_rexec_...</a>
    </div>
    <div>
        <a href="fn_sparql_rexec_with_meta.html">db.dba.sparql_rexec_...</a>
    </div>
    <div>
        <a href="fn_sparql_select_known_graphs.html">db.dba.sparql_select...</a>
    </div>
    <div>
        <a href="fn_ttlp.html">db.dba.ttlp</a>
    </div>
    <div>
        <a href="fn_ttlp_mt.html">db.dba.ttlp_mt</a>
    </div>
    <div>
        <a href="fn_ttlp_mt_local_file.html">db.dba.ttlp_mt_local...</a>
    </div>
    <div>
        <a href="fn_GROUP_CONCAT.html">group_concat</a>
    </div>
    <div>
        <a href="fn_isref.html">isref</a>
    </div>
    <div>
        <a href="fn_sample.html">sample</a>
    </div>
    <div>
        <a href="fn___xml_get_ns_prefix.html">__xml_get_ns_prefix</a>
    </div>
    <div>
        <a href="fn___xml_get_ns_uri.html">__xml_get_ns_uri</a>
    </div>
    <div>
        <a href="fn_http_nt_triple.html">http_nt_triple</a>
    </div>
    <div>
        <a href="fn_http_ttl_triple.html">http_ttl_triple</a>
    </div>
    <div>
        <a href="fn_iri_split.html">iri_split</a>
    </div>
    <div>
        <a href="fn_ld_dir.html">ld_dir</a>
    </div>
    <div>
        <a href="fn_rdfs_rule_set.html">rdfs_rule_set</a>
    </div>
    <div>
        <a href="fn_sparql_to_sql_text.html">sparql_to_sql_text</a>
    </div>
   </div>
   <div>
      <a href="functions.html#rmt">Remote SQL Data Source</a>
   </div>
   <div>
      <a href="functions.html#repl">Replication</a>
   </div>
   <div>
      <a href="functions.html#soap">SOAP</a>
   </div>
   <div>
      <a href="functions.html#sql">SQL</a>
   </div>
   <div>
      <a href="functions.html#string">String</a>
   </div>
   <div>
      <a href="functions.html#txn">Transaction</a>
   </div>
   <div>
      <a href="functions.html#type">Type Mapping</a>
   </div>
   <div>
      <a href="functions.html#uddi">UDDI</a>
   </div>
   <div>
      <a href="functions.html#udt">User Defined Types &amp; The CLR</a>
   </div>
   <div>
      <a href="functions.html#vad">VAD</a>
   </div>
   <div>
      <a href="functions.html#jvmpl">Virtuoso Java PL API</a>
   </div>
   <div>
      <a href="functions.html#bif">Virtuoso Server Extension Interface (VSEI)</a>
   </div>
   <div>
      <a href="functions.html#ws">Web &amp; Internet</a>
   </div>
   <div>
      <a href="functions.html#xml">XML</a>
   </div>
   <div>
      <a href="functions.html#XPATH">XPATH &amp; XQUERY</a>
   </div>
    <br />
   <div>
      <a href="functionidx.html">Functions Index</a>
   </div>
    <br />
  </div>
  <div id="text">
    <h2>DB.DBA.RDF_GRAPH_DIFF</h2>
    <div class="refpurpose">performs the core operation of preparing graph diff.</div>
    <div class="funcsynopsis">
        <span class="funcdef">
     <span class="function">DB.DBA.RDF_GRAPH_DIFF</span>
     </span>
	        (<span class="paramdef">in <span class="parameter">gfrom</span> IRI_ID</span>, 
	        <span class="paramdef">in <span class="parameter">gto</span> IRI_ID</span>, 
	        <span class="paramdef">in <span class="parameter">only_gfrom</span> any</span>, 
	        <span class="paramdef">in <span class="parameter">only_gto</span> any</span>, 
	        <span class="paramdef">in <span class="parameter">accuracy </span> integer</span>, 
	        <span class="paramdef">inout <span class="parameter">fp_list</span> any</span>, 
	        <span class="paramdef">inout <span class="parameter">invfp_list</span> any</span>, 
	        <span class="paramdef">inout <span class="parameter">gfrom_rules</span> any</span>, 	        	        	        	        	        
	        <span class="paramdef">inout <span class="parameter">gto_rules</span> any</span>, 
          <span class="paramdefoptional">[in <span class="optional">equiv_map</span> any := null]</span>, 
          <span class="paramdefoptional">[in <span class="optional">equiv_rev</span> any := null]</span>);  
      </div>
  
  
  
  <div class="refsect1">
    <div class="refsect1title">Description</div>
    <p>Performs the core operation of preparing graph diff - matching between nodes of two graphs.</p>
    <p>Typically is called from wrapper that returns the diff in an extended GUO ontology 
(http://webr3.org/owl/guo#) as a string output in TURTLE syntax.</p>
  </div>
  <div class="refsect1">
    <div class="refsect1title">Parameters</div>
    <div class="refsect2">
        <span class="refsect2title">gfrom – </span>
      IRI ID of the from graph
    </div>
    <div class="refsect2">
        <span class="refsect2title">gto – </span>
      IRI ID of the destination graph
    </div>
    <div class="refsect2">
        <span class="refsect2title">only_gfrom – </span>
      Dictionaries of triples that present only in gfrom (but have no matches in gto)
    </div>
    <div class="refsect2">
        <span class="refsect2title">only_gto – </span>
      Dictionaries of triples that present only in gto (but have no matches in gfrom)
    </div>
    <div class="refsect2">
        <span class="refsect2title">accuracy – </span>
      Tells the procedure what should be done if one or both graphs contain blank nodes. If zero then 
      	different bnodes are treated as distinct. Bnodes are allocated individually for each data load, so 
      	even if one and the same resource is loaded in two different graphs then these graphs will contain 
      	no blank nodes in common, accuracy=0 would result in the diff containing all triples from both 
      	graphs that have bnode subject o object. If nonzero then the procedure will try to match blank 
      	nodes, zipper style. In this case rest of arguments comes to play.
    </div>
    <div class="refsect2">
        <span class="refsect2title">fp_list – </span>
      Vector of IRI_IDs of predicates that are supposed to be functional properties, i.e., any 
      	given subject has no more than one value of a given predicate.
    </div>
    <div class="refsect2">
        <span class="refsect2title">invfp_list – </span>
      Vector of IRI_IDs of (supposedly) inverse functional properties, i.e., any given object 
      	could be the value of a given predicate for no more than one subject. The best source of such 
      	vectors is a good ontology suitable for both graphs. Types owl:functionalProperty and 
      	owl:inverseFunctionalProperty will provide truly &quot;meaningful&quot; lists of predicates that 
      	will provide really &quot;meaningful&quot; patch. Meaningful patches have three important advantages:
<ul>
  <li>they&#39;re as compact as possible; </li>
  <li>human readers undestand them better;</li>
  <li>when a diff is applied to a graph that differs from gfrom then either the result is 
  	accurate and satisfies the ontology or the patch procedure reports meaningful conflicts. If 
  	the ontology is not specified then <a href="fn_rdf_graph_collect_fp_list.html">DB.DBA.RDF_GRAPH_COLLECT_FP_LIST</a>
  	can be used to build these list on some representative collection of similar graphs. That&#39;s 
  	&quot;better than nothing&quot;, but the quality of the resulting diffs may be worse if some predicates 
  	only occasionally have one object per subject or one subject per object in sample graps or if 
  	some functional/inverse functional predicates are not used in sample graphs but appear in 
  	graphs to diff. Remember, diff on graphs with blank nodes is based on heuristics, it&#39;s better 
  	to run it on sound data, not on results of other heuristics.</li>  
</ul>      
    </div>
    <div class="refsect2">
        <span class="refsect2title">fp_list – </span>
      If NULL but accuracy is not zero then the function will call 
      	<a href="fn_rdf_graph_collect_fp_list.html">DB.DBA.RDF_GRAPH_COLLECT_FP_LIST</a> internally, using graphs gfrom and gto as specimens.
    </div>
    <div class="refsect2">
        <span class="refsect2title">invfp_list – </span>
      If NULL but accuracy is not zero then the function will call 
      	<a href="fn_rdf_graph_collect_fp_list.html">DB.DBA.RDF_GRAPH_COLLECT_FP_LIST</a> internally, using graphs gfrom and gto as specimens.
    </div>
    <div class="refsect2">
        <span class="refsect2title">gfrom_rules – </span>
      Describes how bnodes of graphs were matched, i.e., how sliders were moved along 
      	chains of predicates.
    </div>
    <div class="refsect2">
        <span class="refsect2title">gto_rules – </span>
      Describes how bnodes of graphs were matched, i.e., how sliders were moved along chains of predicates.
      Every event during matching of bnodes produces a rule that should be followed when the patch will scan its input graph for bnodes to edit.      
    </div>
    <div class="refsect2">
        <span class="refsect2title">equiv_map – </span>
      Dictionary that describe the match between bnodes in gfrom and gto. In equiv_map, bnodes from gfrom are keys and matching bnodes from gto are values.
    </div>
    <div class="refsect2">
        <span class="refsect2title">equiv_rev – </span>
      Dictionary that describes the match between bnodes in gfrom and gto. In equiv_rev, same 
      	pairs are in different roles, bnodes from gfrom are values for matching bnodes from gto that 
      	are now keys. These data can be incomplete or NULL at all, but if provided then 
      	the function will trust them blindly.
    </div>
  </div>
  <div class="refsect1">
      <div class="refsect1title">Return Types</div>
    <p>any</p>
  </div>

  
  <div class="refsect1">
    <div class="refsect1title">See Also</div>
    <p>
        <a href="rdfperformancetuning.html#fastapproxdiffandpatch">Fast Approximate RDF Graph Diff and Patch</a>
      </p>             
    <p>
        <a href="fn_rdf_suo_diff_ttl.html">DB.DBA.RDF_SUO_DIFF_TTL</a>
      </p>
    <p>
        <a href="fn_rdf_suo_apply_patch.html">DB.DBA.RDF_SUO_APPLY_PATCH</a>
      </p>
    <p>
        <a href="fn_rdf_graph_collect_fp_list.html">DB.DBA.RDF_GRAPH_COLLECT_FP_LIST</a>
      </p>            
  </div>
</div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>