<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Introduction to RDF and SPARQL</title>
	<atom:link href="http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql/feed" rel="self" type="application/rss+xml" />
	<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql</link>
	<description>From the mind of Philip</description>
	<lastBuildDate>Sun, 28 Aug 2011 12:59:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: Buzz</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-2359</link>
		<dc:creator>Buzz</dc:creator>
		<pubDate>Sat, 03 Jul 2010 17:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-2359</guid>
		<description>You should probably not use bound variables (but anonymous ones) in your examples if you don’t plan to SELECT those variables…</description>
		<content:encoded><![CDATA[<p>You should probably not use bound variables (but anonymous ones) in your examples if you don’t plan to SELECT those variables…</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phreedom</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1187</link>
		<dc:creator>Phreedom</dc:creator>
		<pubDate>Tue, 21 Jul 2009 07:57:22 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1187</guid>
		<description>Mark, this is definitely an interesting find, although I suspect you can find examples where Prolog would be slower. I hope SPARQL backend writers are aware of this approach also. If not, you&#039;d better let them know :)</description>
		<content:encoded><![CDATA[<p>Mark, this is definitely an interesting find, although I suspect you can find examples where Prolog would be slower. I hope SPARQL backend writers are aware of this approach also. If not, you&#8217;d better let them know :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pvanhoof</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1183</link>
		<dc:creator>pvanhoof</dc:creator>
		<pubDate>Sun, 19 Jul 2009 16:11:14 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1183</guid>
		<description>@Rogier Brussee: Yeh I was aware of that. But while I was making the examples I liked the &lt;test:Picca&gt; URIs more (for being short on the blog). I hope it didn&#039;t confuse people too much, though. If those people simply don&#039;t write the &lt; and &gt;, for the subjects, they should get the full URI as subject instead.</description>
		<content:encoded><![CDATA[<p>@Rogier Brussee: Yeh I was aware of that. But while I was making the examples I liked the <test:picca> URIs more (for being short on the blog). I hope it didn&#8217;t confuse people too much, though. If those people simply don&#8217;t write the < and >, for the subjects, they should get the full URI as subject instead.</test:picca></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Probst</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1184</link>
		<dc:creator>Mark Probst</dc:creator>
		<pubDate>Sun, 19 Jul 2009 15:06:11 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1184</guid>
		<description>@IvanFrade: Using triplets doesn&#039;t save you from having to do backtracking or something similar (probably less efficient).  Consider, for example, this graph: http://gist.github.com/149936 .  It&#039;s 21 nodes linked in a linear fashion from n0 to n20, including backlinks.  To find the correct way from n0 to n20 you&#039;ll use this query: http://gist.github.com/149938 .  Finding N1 is easy, because there&#039;s only one node adjacent to n0.  But N2 could be n0 or n2.  The only way to know whether it is one or the other (or both) is to try out all possibilities for the rest of the query.  Of course you could do this without backtracking by, for example, first generating all possible assignments (the Cartesian product) and then eliminating the ones which contain non-existent triplets.  That would be less efficient and would cost much more memory, though.

As it happens, I&#039;ve tried running that query through rdfproc - it took about 50 seconds to complete.  The same query in Prolog (http://gist.github.com/149940), using SWI-Prolog (which is not know for its performance), took a bit more than 100 milliseconds, including start-up, compilation and shut-down.</description>
		<content:encoded><![CDATA[<p>@IvanFrade: Using triplets doesn&#8217;t save you from having to do backtracking or something similar (probably less efficient).  Consider, for example, this graph: <a href="http://gist.github.com/149936" rel="nofollow">http://gist.github.com/149936</a> .  It&#8217;s 21 nodes linked in a linear fashion from n0 to n20, including backlinks.  To find the correct way from n0 to n20 you&#8217;ll use this query: <a href="http://gist.github.com/149938" rel="nofollow">http://gist.github.com/149938</a> .  Finding N1 is easy, because there&#8217;s only one node adjacent to n0.  But N2 could be n0 or n2.  The only way to know whether it is one or the other (or both) is to try out all possibilities for the rest of the query.  Of course you could do this without backtracking by, for example, first generating all possible assignments (the Cartesian product) and then eliminating the ones which contain non-existent triplets.  That would be less efficient and would cost much more memory, though.</p>
<p>As it happens, I&#8217;ve tried running that query through rdfproc &#8211; it took about 50 seconds to complete.  The same query in Prolog (<a href="http://gist.github.com/149940" rel="nofollow">http://gist.github.com/149940</a>), using SWI-Prolog (which is not know for its performance), took a bit more than 100 milliseconds, including start-up, compilation and shut-down.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rogier Brussee</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1188</link>
		<dc:creator>Rogier Brussee</dc:creator>
		<pubDate>Thu, 16 Jul 2009 13:14:16 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1188</guid>
		<description>Nice down to earth introduction to rdf/rdfs!

One notational thing: I think that in Turtle  means the rdf node with URI identifier

 test:Picca

rather than the rdf node with URI identifier

http://www.tracker-project.org/ontologies/test#Picca

which I think is what you want and which is exactly what test:Picca (without the angle brackets) means given your @prefix test: definition. In other words, the angle brackets in Turtle (and SPARQL) are like quotes and allow you to use arbitrary URI&#039;s  for labeling identifiers for nodes in the rdf graph [1]. Check out

http://www.w3.org/TeamSubmission/turtle/

in particular section 2.1.

By the way there is a convention to use lowercase identifiers for instances (e.g. test:picca instead of test:Picca) and identifiers starting with a capital for classes but that is just a convention.



[1] People usually use http URL&#039;s. One can also use URI&#039;s which are not URL&#039;s, e.g.  is a reasonable way to refer to the rdf node representing the mailbox of John Smith.  Personally, I prefer to use non URL&#039;s for &quot;things&quot; like parrots that cannot be obviously retrieved over the internet  i.e. I like to use  for a nicely namespaced, uniquely labelled rdf node for a parrot Picca,  a rdf node  for his homepage and  for the rdf node of his maibox. I can then say


@prefix foaf: .
@prefix rdfs: .

 a test:Parrot;
             rdfs:comment &quot;the rdf node for Picca the Parrot&quot;;
             foaf:homePage ;
             foaf:mailbox     .

to claim that Picca the parrot has a homepage and a mailbox (note that the URI labels of the rdf nodes have no meaning other than giving them a unique name).  One could then say other things about that home page or the mailbox e.g.

 a foaf:Document;
      rdfs:comment &quot;the rdf node for the home page of Picca the Parrot&quot;;
      rdfs:seeAlso &quot;http://www.tracker.org/homepage/Picca&quot;^^xsd:anyURI;
      rdfs:seeAlso &quot;http://www.pvanhoof.com/Pets/Picca&quot;^^xsd:anyURI;
      foaf:maker  [ a foaf:Person;
                             foaf:nick &quot;pvanhoof&quot;].


to claim that the homepage is a document created by a person with nickname pvanhoof, and that you may want to check  the web address (rather than the rdf node) http://www.tracker.org/homepage/Picca and/or http://www.pvanhoof.com/Pets/Picca, if you are interested in that  document node. YMMV.</description>
		<content:encoded><![CDATA[<p>Nice down to earth introduction to rdf/rdfs!</p>
<p>One notational thing: I think that in Turtle  means the rdf node with URI identifier</p>
<p> test:Picca</p>
<p>rather than the rdf node with URI identifier</p>
<p><a href="http://www.tracker-project.org/ontologies/test#Picca" rel="nofollow">http://www.tracker-project.org/ontologies/test#Picca</a></p>
<p>which I think is what you want and which is exactly what test:Picca (without the angle brackets) means given your @prefix test: definition. In other words, the angle brackets in Turtle (and SPARQL) are like quotes and allow you to use arbitrary URI&#8217;s  for labeling identifiers for nodes in the rdf graph [1]. Check out</p>
<p><a href="http://www.w3.org/TeamSubmission/turtle/" rel="nofollow">http://www.w3.org/TeamSubmission/turtle/</a></p>
<p>in particular section 2.1.</p>
<p>By the way there is a convention to use lowercase identifiers for instances (e.g. test:picca instead of test:Picca) and identifiers starting with a capital for classes but that is just a convention.</p>
<p>[1] People usually use http URL&#8217;s. One can also use URI&#8217;s which are not URL&#8217;s, e.g.  is a reasonable way to refer to the rdf node representing the mailbox of John Smith.  Personally, I prefer to use non URL&#8217;s for &#8220;things&#8221; like parrots that cannot be obviously retrieved over the internet  i.e. I like to use  for a nicely namespaced, uniquely labelled rdf node for a parrot Picca,  a rdf node  for his homepage and  for the rdf node of his maibox. I can then say</p>
<p>@prefix foaf: .<br />
@prefix rdfs: .</p>
<p> a test:Parrot;<br />
             rdfs:comment &#8220;the rdf node for Picca the Parrot&#8221;;<br />
             foaf:homePage ;<br />
             foaf:mailbox     .</p>
<p>to claim that Picca the parrot has a homepage and a mailbox (note that the URI labels of the rdf nodes have no meaning other than giving them a unique name).  One could then say other things about that home page or the mailbox e.g.</p>
<p> a foaf:Document;<br />
      rdfs:comment &#8220;the rdf node for the home page of Picca the Parrot&#8221;;<br />
      rdfs:seeAlso &#8220;http://www.tracker.org/homepage/Picca&#8221;^^xsd:anyURI;<br />
      rdfs:seeAlso &#8220;http://www.pvanhoof.com/Pets/Picca&#8221;^^xsd:anyURI;<br />
      foaf:maker  [ a foaf:Person;<br />
                             foaf:nick "pvanhoof"].</p>
<p>to claim that the homepage is a document created by a person with nickname pvanhoof, and that you may want to check  the web address (rather than the rdf node) <a href="http://www.tracker.org/homepage/Picca" rel="nofollow">http://www.tracker.org/homepage/Picca</a> and/or <a href="http://www.pvanhoof.com/Pets/Picca" rel="nofollow">http://www.pvanhoof.com/Pets/Picca</a>, if you are interested in that  document node. YMMV.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wouter Bolsterlee</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1185</link>
		<dc:creator>Wouter Bolsterlee</dc:creator>
		<pubDate>Wed, 15 Jul 2009 18:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1185</guid>
		<description>You should probably not use bound variables (but anonymous ones) in your examples if you don&#039;t plan to SELECT those variables…</description>
		<content:encoded><![CDATA[<p>You should probably not use bound variables (but anonymous ones) in your examples if you don&#8217;t plan to SELECT those variables…</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pvanhoof</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1186</link>
		<dc:creator>pvanhoof</dc:creator>
		<pubDate>Wed, 15 Jul 2009 14:26:03 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1186</guid>
		<description>@gnublade: oh, yes, that must have been a copy-paste error. I made the blog a bit shorter afterward by removing some stuff from that ontology. Must have gone wrong at that point.

Thanks for pointing out! I will correct it immediately.</description>
		<content:encoded><![CDATA[<p>@gnublade: oh, yes, that must have been a copy-paste error. I made the blog a bit shorter afterward by removing some stuff from that ontology. Must have gone wrong at that point.</p>
<p>Thanks for pointing out! I will correct it immediately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gnublade</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1189</link>
		<dc:creator>gnublade</dc:creator>
		<pubDate>Wed, 15 Jul 2009 13:59:07 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1189</guid>
		<description>Shouldn&#039;t the range for hasFriend be test:Contact?

test:hasFriend a rdf:Property ;
	rdfs:domain test:Contact ;
	rdfs:range test:Contact .</description>
		<content:encoded><![CDATA[<p>Shouldn&#8217;t the range for hasFriend be test:Contact?</p>
<p>test:hasFriend a rdf:Property ;<br />
	rdfs:domain test:Contact ;<br />
	rdfs:range test:Contact .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IvanFrade</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1193</link>
		<dc:creator>IvanFrade</dc:creator>
		<pubDate>Wed, 15 Jul 2009 09:37:11 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1193</guid>
		<description>@Mark: it looks like prolog if you think about it as &quot;give me the values of these variables that match a certain graph&quot;. But SparQL is using triplets: no backtracking, no inference, just direct match.</description>
		<content:encoded><![CDATA[<p>@Mark: it looks like prolog if you think about it as &#8220;give me the values of these variables that match a certain graph&#8221;. But SparQL is using triplets: no backtracking, no inference, just direct match.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pvanhoof</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1191</link>
		<dc:creator>pvanhoof</dc:creator>
		<pubDate>Tue, 14 Jul 2009 20:53:06 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1191</guid>
		<description>@choeger: Not every dog is necessarily a pet. So no. But that doesn&#039;t mean that a resource can&#039;t be both a Pet and a Dog at the same time, in RDF.</description>
		<content:encoded><![CDATA[<p>@choeger: Not every dog is necessarily a pet. So no. But that doesn&#8217;t mean that a resource can&#8217;t be both a Pet and a Dog at the same time, in RDF.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: choeger</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1190</link>
		<dc:creator>choeger</dc:creator>
		<pubDate>Tue, 14 Jul 2009 20:48:12 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1190</guid>
		<description>Hi,

shouldn&#039;t that be:

test:Dog a rdfs:Class ;
	rdfs:subClassOf test:Pet .

??</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>shouldn&#8217;t that be:</p>
<p>test:Dog a rdfs:Class ;<br />
	rdfs:subClassOf test:Pet .</p>
<p>??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Probst</title>
		<link>http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1192</link>
		<dc:creator>Mark Probst</dc:creator>
		<pubDate>Tue, 14 Jul 2009 20:30:11 +0000</pubDate>
		<guid isPermaLink="false">http://pvanhoof.be/blog/index.php/2009/07/14/introduction-to-rdf-and-sparql#comment-1192</guid>
		<description>Wow, it&#039;s Prolog!  Only more wordy!  And probably slower!  And almost 40 years late!

Sometimes I really believe the old saying &quot;There are no new ideas in computer science&quot;.</description>
		<content:encoded><![CDATA[<p>Wow, it&#8217;s Prolog!  Only more wordy!  And probably slower!  And almost 40 years late!</p>
<p>Sometimes I really believe the old saying &#8220;There are no new ideas in computer science&#8221;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

