Hey CNN, SPARQL isn't so difficult.

And like any programming language, it doesn't have to be convoluted.
Supa Dupa Fly cover

In the December 17th cnn.com/technology article Making sense of the 'semantic Web', Steve Mollman wrote:

Consider, for instance, SPARQL, a query language. To find, say, music artists associated with the producer Timbaland, you'd have to type a long piece of convoluted code that most of us wouldn't bother to do.

Steve: try pasting the following into DBPedia's SPARQL Query Form and then clicking the "Run Query" button:

PREFIX d: <http://dbpedia.org/property/>

SELECT DISTINCT ?artist WHERE {
  ?album d:artist ?artist.
  ?album d:producer <http://dbpedia.org/resource/Timbaland>.
}

Or just click here.

That wasn't so bad, was it? I could make it shorter, but if you're not familiar with basic SPARQL queries, you might consider the shorter version more convoluted. Of course, it doesn't have the elegant clarity of this bit of JavaScript included as part of your article's web page:

if(cnnWinExtraRegExp.test(cnnWinExtra)){var cnnOmniExtra = 
  cnnWinExtraRegExp.split(cnnWinExtra);cnnWinLoc = cnnWinLoc + cnnOmniExtra[0];}
else {cnnWinLoc = cnnWinLoc + cnnWinExtra;}}
if (typeof(cnnPageName) != "undefined") {s.pageName = 
  cnnPageName;s.eVar1 = cnnPageName;} else {s.pageName = cnnWinLoc;s.eVar1 = cnnWinLoc;}
if (typeof(cnnSectionName) != "undefined") {s.channel=cnnSectionName;s.eVar2=cnnSectionName;} 
else {s.channel="Nonlabeled";s.eVar2="Nonlabeled";}
if (typeof(cnnSubSectionName) != "undefined") 
{s.server=cnnSubSectionName;s.eVar3=cnnSubSectionName;} else {s.server="";s.eVar3="";}
if (typeof(cnnSectionFront) != "undefined") {s.prop1=cnnSectionFront;} 
if (typeof(cnnContentType) != "undefined") {s.prop4=cnnContentType;s.prop6=s.pageName;}

As with SQL and other query languages, no one expects end users to type out SPARQL queries like the one above, but someone who already knows a scripting language or two can pick up SPARQL and use it to build new kinds of applications. Like the JavaScript included in your article's web page, SPARQL will play an increasingly valuable role in bringing information to people.

And being Elvis's birthday today, I'd like to express my hope that the next time someone does another updated remix of an Elvis tune to follow "A Little Less Conversation" and "Rubberneckin'," I hope it's Timbaland.

1 TrackBacks

Listed below are links to blogs that reference this entry: Hey CNN, SPARQL isn't so difficult..

TrackBack URL for this entry: http://www.snee.com/cgi-sys/cgiwrap/bobd/managed-mt/mt-tb.cgi/471

A post from Bob DuCharme’s blog exposes a fallacy in popular opinion on computing in general, and databases in particular… Hey CNN, SPARQL isn’t so difficult The CNN report disparages SQARQL queries on semantic information as “l... Read More

2 Comments

theres something to be said about not inventing another syntax.

metaweb has shown how SPARQL-like queries can be formatted in JSON. this makes it much easier for end-users of browser-based tools.

agree with the original point of the post. why do these cnet/nyt/cnn type places like to make sweeping remarks?


Do you have a URL for that?

I must admit, I've been hearing "SPARQL-like" from so many different directions that I really prefer to go with the actual standard. The syntax isn't so bad, and there are a lot of implementations out there.