SPARQL

Using SPARQL to find the right DBpedia URI

Even with the wrong name.

In Pulling SKOS prefLabel and altLabel values out of DBpedia, I described how Wikipedia and DBpedia store useful data about alternative names for resources described on Wikipedia, and I showed how you can use these to populate a SKOS dataset’s alternative and preferred label properties. Today I want to show how to use these as part of an application that lets you retrieve data even when you don’t necessarily have the right name for something—for example, retrieving a picture of Bob…

Retrieval of triples from relational databases is a popular topic in the semantic web world, but I was recently wondering how much trouble it would be to go in the opposite direction: to retrieve data from a SPARQL endpoint and load it into a relational database. It wasn’t much trouble at all. When you retrieve the results in the SPARQL query results XML format, a straightforward XSLT spreadsheet can convert it into the necessary SQL INSERT statements. I was able to automate the data…

Form-driven SPARQL queries without scripting

Just two lines in an .htaccess file.

In a podcast of a radio show I was listening to recently, the host asserted that 80s rapper Schoolly D had scored most of director Abel Ferrara’s films. I was curious about this, so I went to IMDB’s page for Ferrara, clicked on the first film title, scrolled down, clicked “Full cast and crew”, checked the music credit, returned to Ferrara’s main page, and repeated the last few steps… until I realized that one SPARQL query could create a single list of…

Pulling SKOS prefLabel and altLabel values out of DBpedia

Or, using linked data to build a standards-compliant thesaurus with SPARQL.

When my TopQuadrant colleague Dean Allemang referred to the use of DBpedia as a controlled vocabulary, I said “Huh?” He helped me to realize that if you and I want to refer to the same person, place, or thing, but there’s a chance that we might use different names for it, DBpedia’s URI for it might make the best identifier for us to both use. For example, if you refer to the nineteenth-century American president and Civil War general Ulysses S. Grant and I refer to him as…

When I learned that release 2.8.5 of ARQ implements all of SPARQL 1.1 Query (“except for corner cases of property paths”, and Andy Seaborne recently told me that they’ve finished up that part) I decided to try out some of the SPARQL 1.1 features, and it was all pretty easy. I used ARQ from the command line and went through Lee Feigenbaum’s slides on the status of SPARQL 1.1 as a checklist of things to try. For sample queries and data I tried to use the examples in the…

RESTful SPARQL queries of RDFa

No local parsing or querying software needed.

Facebook’s OpenGraph, Google’s Rich Snippets, BestBuy’s use of the GoodRelations vocabulary and other recent events are boosting RDFa’s popularity for storing machine-readable data in web pages. There are several tools and programming libraries available (not to mention built-in features of development platforms such as TopQuadrant’s TopBraid Suite for application development) that let you extract the RDF triples from this RDFa markup and use it, but I recently…