Try out SPARQL!

To really get familiar with SPARQL, you should practice what you’ve learned so far. It’s not too late to get started with running SPARQL queries on the MusicBrainz dataset …

Exercises

To practice what you have learned this week, use the Euclid Exercise 2 endpoint.

Remember: it is strongly recommended that you read and / or print out the attached Exercise 2 worksheet before you try to run any queries.

You should try running each of the queries discussed in the course, but you will get the most out of the exercise by modifying the queries afterwards to apply the theory to new examples.

Hints

Note: This exercise will work on mobile devices, but typing the code will be much less prone to errors using a keyboard, and a larger screen will make it easier to manage your code. We recommend using a PC or laptop if possible.

When accessing the exercise, you will first need to connect to a repository, so that you can access the data. Select ‘Choose repository’ at the top-right of the screen, and then select ‘MusicBrainz’ from the drop-down list.

To try out SPARQL queries on the MusicBrainz dataset, you then need to head to ‘SPARQL’ on the menu at the top of the page. Then, in the query box, you can type in a SPARQL query, and then select ‘Run’ to execute it and see the results below.

For this exercise, you should go back through the steps on SPARQL queries and try out each type of query and keyword that we’ve covered so far. Try experimenting by changing things are you desire to see the different results. If you are unsure about how to construct a particular type of query, try asking your fellow learners in the comments below.


If you want, you may also download Sesame from this location to create a local triple store on your machine and run update SPARQL queries. There is a Sesame screencast for instruction on how to do this, but we suggest you only attempt this if you feel comfortable setting something like this up yourself as it is not the focus of this course and we will not be providing any facilitation support with this.


Share this article:

This article is from the free online course:

Introduction to Linked Data and the Semantic Web

University of Southampton

Get a taste of this course

Find out what this course is like by previewing some of the course steps before you join: