These queries use a resource called the linkedMDB, the Linked Movie Database. It is a simple translation of a relational database about movies into RDF. It hasn't been maintained for a while, but it is still good for making examples. Because it was a relational database, it has some interseting foibles that we explore in these queries.

The data for these queries can be dowloaded from linkedMDB.ttl

Query ch6.38 Matching Directors and Actors visit query on data.world

Sometimes actors are also directors. Since the linkedMDB came from a database with separate tables for Director and Actor, these aren't obviously the same entity. We can find out that they are the same by using their foaf:page.

In this query, we filter the data to match the output shown in the book; feel free to remove those lines to see all the output. This query will find all of the matching people in the source data, and create skos:exactMatch triples for them.

Query ch6.39 Matching Directors vs Actors visit query on data.world

This is just like the previous query, but filters out the dopey triples of the form ?x skos:exactMatch ?x . Just like the one above, feel free to comment out the filters and get matches for all the actors/directors.

Query ch6.40 Matching Directors to Actors 1-1 visit query on data.world

The most advanced of the three queries, this one suppresses the duplicates of the form ?a skos:exactMatch ?b . and ?b skos:exactMatch ?a .

The output from this query is saved as "DirectorActorCrosswalk", and is used in later queries.