SlideShare ist ein Scribd-Unternehmen logo
1 von 115
SPARQL
                        -
Query Basics and Federated Queries
                    Knud Möller, Talis Systems Ltd.
                          @knudmoeller



                               16 April 2012
     Tutorial: Practical Cross-Dataset Queries on the Web of Data
                         WWW2012, Lyon, France
What is SPARQL?

• query language for RDF graphs (i.e., linked
  data)
• get specific information out of a dataset (or
  several datasets)
• “The SQL for the Web of Data”
                        LQRA P S
History

• 2004: work started on SPARQL
• 2008: SPARQL 1.0 finished (W3C Rec)
• 2009: work started on SPARQL 1.1
• 2012 (now): SPARQL 1.1 almost finished
• soon: SPARQL 1.1 finished
SPARQL Endpoint




                 SPARQL Endpoint
    Query in




   Result back
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?album ?title ?release_date

WHERE {
! ?album a mo:Record ;
! ! dce:date ?release_date ;
! ! dce:title ?title .
! FILTER (year(?release_date) = 2007 &&
          month(?release_date) = 7)
}

ORDER BY ?release_date
SPARQL in a Nutshell


1   query clause

2   WHERE clause
SPARQL in a Nutshell
                   What do I want to get back?
                   • SELECT: list of things
                   • DESCRIBE: RDF graph for one
                     resource
                   • CONSTRUCT: custom RDF graph
1   query clause   • ASK: boolean value (true or false)
2   WHERE clause
SPARQL in a Nutshell
                   What do I want to get back?
                   • SELECT: list of things
                   • DESCRIBE: RDF graph for one
                     resource
                   • CONSTRUCT: custom RDF graph
1   query clause   • ASK: boolean value (true or false)
2   WHERE clause   Which part of the graph am I looking for?
                   • WHERE
                   • triple patterns
                   • graph patterns
SPARQL in a Nutshell
                   What do I want to get back?
                   • SELECT: list of things
                   • DESCRIBE: RDF graph for one
0     Prologue       resource
                   • CONSTRUCT: custom RDF graph
1   query clause   • ASK: boolean value (true or false)
2   WHERE clause   Which part of the graph am I looking for?
                   • WHERE
                   • triple patterns
                   • graph patterns
SPARQL in a Nutshell
                   What do I want to get back?
                   • SELECT: list of things
                   • DESCRIBE: RDF graph for one
0     Prologue       resource
                   • CONSTRUCT: custom RDF graph
1   query clause   • ASK: boolean value (true or false)
2   WHERE clause   Which part of the graph am I looking for?
                   • WHERE
3    Modifiers      • triple patterns
                   • graph patterns
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?album ?title ?release_date

WHERE {
! ?album a mo:Record ;
! ! dce:date ?release_date ;
! ! dce:title ?title .
! FILTER (year(?release_date) = 2007 &&
          month(?release_date) = 7)
}

ORDER BY ?release_date
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?album ?title ?release_date

WHERE {
! ?album a mo:Record ;
! ! dce:date ?release_date ;
! ! dce:title ?title .
! FILTER (year(?release_date) = 2007 &&
          month(?release_date) = 7)
}

ORDER BY ?release_date
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?album ?title ?release_date

WHERE {
! ?album a mo:Record ;
! ! dce:date ?release_date ;
! ! dce:title ?title .
! FILTER (year(?release_date) = 2007 &&
          month(?release_date) = 7)
}

ORDER BY ?release_date
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?album ?title ?release_date

WHERE {
! ?album a mo:Record ;            graph pattern
! ! dce:date ?release_date ;
! ! dce:title ?title .
! FILTER (year(?release_date) = 2007 &&
          month(?release_date) = 7)
}

ORDER BY ?release_date
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?album ?title ?release_date

WHERE {
! ?album a mo:Record ;            graph pattern
! ! dce:date ?release_date ;
! ! dce:title ?title .
! FILTER (year(?release_date) = 2007 &&
          month(?release_date) = 7)
}

ORDER BY ?release_date
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?album ?title ?release_date

WHERE {
! ?album a mo:Record ;            graph pattern
! ! dce:date ?release_date ;
! ! dce:title ?title .
! FILTER (year(?release_date) = 2007 &&
          month(?release_date) = 7)
}

ORDER BY ?release_date
Example Data
• from music site Jamendo:
  http://ww.jamendo.com
• linked data at DBTune:
  http://dbtune.org/jamendo/
• thousands of artists with albums, tracks, etc.
• additionally, some geographical data from
  Geonames:
  http://www.geonames.org/
http://                                                      http://                                   http://
                                      Whiteshoulders                                                         www.petithomme.org              Petit Homme
    img.jamendo.com/                                          blackshoulders.hautetfort.com/
      artists/w/white-
       shoulders.jpg                                                                                                                       foaf:name
                                                                                                                                foaf:homepage
                                          foaf:name foaf:homepage                        mo:MusicArtist
                               foaf:img                                                                                   a
                                                                       a                                                                     artists:3908
 records:4092
                      foaf:made
                                          artists:3732                                                              foaf:based_near
                                                                                                                                      foaf:made      foaf:made
                     foaf:made                               foaf:based_near
                                                                                      locations:3019599/                                       foaf:img
records:6361                                                                                                                                                records:4295
                      foaf:made                                                                                               records:3604

                                                         foaf:made
records:3738                                                                      mo:Record                                                     http://
                                                foaf:maker                                                 W (EP)
                                                                                                                                        img.jamendo.com/
                                                                                                                                              artists/p/
                                                                              a       dce:title                                           petit.homme.gif

                                hg:taggedWithTag               records:8836            dce:date        2007-10-09T15:58:17
     tags:noisy

                                 hg:taggedWithTag
                                                                                          mo:track

      tags:electro                                                                   mo:track
                               hg:taggedWithTag                                                              tracks:90508
                                                                     mo:track mo:track

                                 hg:taggedWithTag
                                                                                                     tracks:90496
     tags:experimental


                                                                 tracks:90504          tracks:90510
                  tags:noise
@base <http://dbtune.org/jamendo/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix mo: <http://purl.org/ontology/mo/> .
@prefix dce: <http://purl.org/dc/elements/1.1/> .
@prefix hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> .
@prefix tags: <tag/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<artist/3908>
    a mo:MusicArtist ;
    foaf:based_near <http://sws.geonames.org/3019599/> ;
    foaf:homepage <http://www.petithomme.org> ;
    foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> ;
    foaf:made <record/3604>, <record/4295> ;
    foaf:name "Petit Homme"^^xsd:string .

<artist/3732>
                                      Text
    a mo:MusicArtist ;
    foaf:based_near <http://sws.geonames.org/3019599/> ;
    foaf:homepage <http://blackshoulders.hautetfort.com/> ;
    foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> ;
    foaf:made <record/3738>, <record/4092>, <record/6361>, <record/8836> ;
    foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>
    dce:date "2007-10-09T15:58:17"^^xsd:dateTime ;
    dce:title "W (EP)"^^xsd:string ;
    mo:track <track/90496>, <track/90504>, <track/90508>, <track/90510> ;
    hg:taggedWithTag tags:electro, tags:experimental, tags:noise, tags:noisy ;
    a mo:Record ;
    foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>   foaf:made <record/4092> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/6361> .
                foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
Triple and Graph
     Patterns
WHERE {
! ?album a mo:Record ;
! ! dce:date ?release_date ;
! ! dce:title ?title .
! FILTER (year(?release_date) = 2007 &&
          month(?release_date) = 7)
}
no variables
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
one variable
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
two variables
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>
<artist/3732>                           Text
                foaf:made <record/4092> .
                foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
three variables


?subject ?predicate ?object
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>   foaf:made <record/4092> .
<artist/3732>   foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>   foaf:made <record/4092> .
<artist/3732>   foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
graph pattern

?artist a mo:MusicArtist ;
! ! foaf:name ?artist_name ;
! ! foaf:homepage ?homepage .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>   foaf:made <record/4092> .
<artist/3732>   foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>   foaf:made <record/4092> .
<artist/3732>   foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
<artist/3908>   a mo:MusicArtist .
<artist/3908>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3908>   foaf:homepage <http://www.petithomme.org> .
<artist/3908>   foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> .
<artist/3908>   foaf:made <record/3604> .
<artist/3908>   foaf:made <record/4295> .
<artist/3908>   foaf:name "Petit Homme"^^xsd:string .

<artist/3732>   a mo:MusicArtist .
<artist/3732>   foaf:based_near <http://sws.geonames.org/3019599/> .
<artist/3732>   foaf:homepage <http://blackshoulders.hautetfort.com/> .
<artist/3732>   foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> .
<artist/3732>   foaf:made <record/3738> .
<artist/3732>   foaf:made <record/4092> .
<artist/3732>   foaf:made <record/6361> .
<artist/3732>   foaf:made <record/8836> .
<artist/3732>   foaf:name "Whiteshoulders"^^xsd:string .

<record/8836>   dce:date "2007-10-09T15:58:17"^^xsd:dateTime .
<record/8836>   dce:title "W (EP)"^^xsd:string .
<record/8836>   mo:track <track/90496> .
<record/8836>   mo:track <track/90504> .
<record/8836>   mo:track <track/90508> .
<record/8836>   mo:track <track/90510> .
<record/8836>   hg:taggedWithTag tags:electro .
<record/8836>   hg:taggedWithTag tags:experimental .
<record/8836>   hg:taggedWithTag tags:noise .
<record/8836>   hg:taggedWithTag tags:noisy .
<record/8836>   a mo:Record .
<record/8836>   foaf:maker <artist/3732> .
Interfaces to SPARQL
        endpoints
• Web interfaces
• Bindings for programming languages
• straight HTTP
• command line interfaces
http://data.semanticweb.org/snorql
http://factforge.net/sparql
http://kasabi.com/dataset/world-geography
ARQ

we will use the arq command line tool - see the
ARQ Command Line Cheat Sheet:

   arq --data data/jamendo.nt
         --query queries/query5.rq
Example Scenario

• Get all albums for a particular month (e.g., July 2007)
• List all Jamendo artists in France
• explore datasets and build final query bit by bit
• learn about different features of SPARQL along the
   way

• cannot cover every aspect of SPARQL! E.g., property
   paths are missing.
List all Classes
SELECT DISTINCT ?class
WHERE {
!   ?s a ?class .
}

                         find all types of things in the dataset (classes)
List all Classes
SELECT DISTINCT ?class
WHERE {
!   ?s a ?class .
}

                          find all types of things in the dataset (classes)

--------------------------------------------------------
| class                                                |
========================================================
| <http://purl.org/ontology/mo/Playlist>               |
| <http://purl.org/ontology/mo/Signal>                 |
| <http://purl.org/ontology/mo/Lyrics>                 |
| <http://purl.org/ontology/mo/Track>                  |
| <http://www.w3.org/2006/time#Interval>               |
| <http://purl.org/ontology/mo/Torrent>                |
| <http://purl.org/ontology/mo/ED2K>                   |
| <http://purl.org/ontology/mo/Record>                 |
| <http://www.holygoat.co.uk/owl/redwood/0.1/tags/Tag> |
| <http://purl.org/ontology/mo/MusicArtist>            |
| <http://xmlns.com/foaf/0.1/Document>                 |
--------------------------------------------------------
List all Classes
SELECT DISTINCT ?class
WHERE {
!   ?s a ?class .
}

                          find all types of things in the dataset (classes)

--------------------------------------------------------
| class                                                |
========================================================
| <http://purl.org/ontology/mo/Playlist>               |
| <http://purl.org/ontology/mo/Signal>                 |
| <http://purl.org/ontology/mo/Lyrics>                 |
| <http://purl.org/ontology/mo/Track>                  |
| <http://www.w3.org/2006/time#Interval>               |
| <http://purl.org/ontology/mo/Torrent>                |
| <http://purl.org/ontology/mo/ED2K>                   |
| <http://purl.org/ontology/mo/Record>                 |
| <http://www.holygoat.co.uk/owl/redwood/0.1/tags/Tag> |
| <http://purl.org/ontology/mo/MusicArtist>            |
| <http://xmlns.com/foaf/0.1/Document>                 |
--------------------------------------------------------
Properties of Artists
PREFIX mo: <http://purl.org/ontology/mo/>

SELECT DISTINCT ?pred
WHERE {
!   ?artist a mo:MusicArtist ;
!   !    ?pred ?obj .
}
                             all properties for the mo:MusicArtist class
Properties of Artists
PREFIX mo: <http://purl.org/ontology/mo/>

SELECT DISTINCT ?pred
WHERE {
!   ?artist a mo:MusicArtist ;
!   !    ?pred ?obj .
}
                             all properties for the mo:MusicArtist class

-----------------------------------------------------
| pred                                              |
=====================================================
| <http://xmlns.com/foaf/0.1/name>                  |
| <http://xmlns.com/foaf/0.1/made>                  |
| <http://xmlns.com/foaf/0.1/img>                   |
| <http://xmlns.com/foaf/0.1/based_near>            |
| <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |
| <http://xmlns.com/foaf/0.1/homepage>              |
| mo:biography                                      |
-----------------------------------------------------
Properties of Artists, ctd.
PREFIX mo: <http://purl.org/ontology/mo/>

SELECT DISTINCT ?class
WHERE {
!   ?artist a mo:MusicArtist ;
!   !    ?pred ?obj .
!   ?obj a ?class ;
}
                                            properties with objects
Properties of Artists, ctd.
PREFIX mo: <http://purl.org/ontology/mo/>

SELECT DISTINCT ?class
WHERE {
!   ?artist a mo:MusicArtist ;
!   !    ?pred ?obj .
!   ?obj a ?class ;
}
                                                   properties with objects

------------------------------------------------
| pred                             | class     |
================================================
| <http://xmlns.com/foaf/0.1/made> | mo:Record |
------------------------------------------------
                                                          only one result?
Properties of Artists, ctd.
PREFIX mo: <http://purl.org/ontology/mo/>

SELECT DISTINCT ?class
WHERE {
!   ?artist a mo:MusicArtist ;
!   !    ?pred ?obj .
!   OPTIONAL {
!   !    ?obj a ?class .
!   }

                                            OPTIONAL statement
}
Properties of Artists, ctd.
PREFIX mo: <http://purl.org/ontology/mo/>

SELECT DISTINCT ?class
WHERE {
!   ?artist a mo:MusicArtist ;
!   !    ?pred ?obj .
!   OPTIONAL {
!   !    ?obj a ?class .
!   }

                                                       OPTIONAL statement
}




-----------------------------------------------------------------
| pred                                              | class     |
=================================================================
| <http://xmlns.com/foaf/0.1/name>                  |           |
| <http://xmlns.com/foaf/0.1/made>                  | mo:Record |
| <http://xmlns.com/foaf/0.1/img>                   |           |
| <http://xmlns.com/foaf/0.1/based_near>            |           |
| <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |           |
| <http://xmlns.com/foaf/0.1/homepage>              |           |
| mo:biography                                      |           |
-----------------------------------------------------------------
Properties of Records
PREFIX   mo: <http://purl.org/ontology/mo/>
PREFIX   hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/>
PREFIX   foaf: <http://xmlns.com/foaf/0.1/>
PREFIX   dce: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT ?pred ?class
WHERE {
!    ?record a mo:Record ;
!    !     ?pred ?obj .
!    OPTIONAL {
!    !     ?obj a ?class .
!    }
}
Properties of Records
PREFIX   mo: <http://purl.org/ontology/mo/>
PREFIX   hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/>
PREFIX   foaf: <http://xmlns.com/foaf/0.1/>
PREFIX   dce: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT ?pred ?class
WHERE {
!    ?record a mo:Record ;
!    !     ?pred ?obj .
!    OPTIONAL {
!    !     ?obj a ?class .
!    }
}




----------------------------------------------------------------------
| pred                                              | class          |
======================================================================
| foaf:maker                                        | mo:MusicArtist |
| mo:track                                          | mo:Track       |
| hg:taggedWithTag                                  | hg:Tag         |
| <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |                |
| mo:available_as                                   | mo:ED2K        |
| mo:image                                          |                |
| dce:date                                          |                |
| mo:available_as                                   | mo:Torrent     |
| dce:title                                         |                |
| mo:available_as                                   | mo:Playlist    |
| dce:description                                   |                |
----------------------------------------------------------------------
Properties of Records
PREFIX   mo: <http://purl.org/ontology/mo/>
PREFIX   hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/>
PREFIX   foaf: <http://xmlns.com/foaf/0.1/>
PREFIX   dce: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT ?pred ?class
WHERE {
!    ?record a mo:Record ;
!    !     ?pred ?obj .
!    OPTIONAL {
!    !     ?obj a ?class .
!    }
}




----------------------------------------------------------------------
| pred                                              | class          |
======================================================================
| foaf:maker                                        | mo:MusicArtist |
| mo:track                                          | mo:Track       |
| hg:taggedWithTag                                  | hg:Tag         |
| <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |                |
| mo:available_as                                   | mo:ED2K        |
| mo:image                                          |                |
| dce:date                                          |                |
| mo:available_as                                   | mo:Torrent     |
| dce:title                                         |                |
| mo:available_as                                   | mo:Playlist    |
| dce:description                                   |                |
----------------------------------------------------------------------
Properties of Records, ctd.
PREFIX   mo: <http://purl.org/ontology/mo/>
PREFIX   hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/>
PREFIX   foaf: <http://xmlns.com/foaf/0.1/>
PREFIX   dce: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT ?pred ?class
WHERE {
!    ?record a mo:Record ;
!    !     ?pred ?obj .
!    OPTIONAL {
!    !     ?obj a ?class .
!    }
} ORDER BY ASC(?pred) DESC(?class)
                                                                 ORDER BY statement
Properties of Records, ctd.
PREFIX   mo: <http://purl.org/ontology/mo/>
PREFIX   hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/>
PREFIX   foaf: <http://xmlns.com/foaf/0.1/>
PREFIX   dce: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT ?pred ?class
WHERE {
!    ?record a mo:Record ;
!    !     ?pred ?obj .
!    OPTIONAL {
!    !     ?obj a ?class .
!    }
} ORDER BY ASC(?pred) DESC(?class)
                                                                         ORDER BY statement
----------------------------------------------------------------------
| pred                                              | class          |
======================================================================
| dce:date                                          |                |
| dce:description                                   |                |
| dce:title                                         |                |
| mo:available_as                                   | mo:Torrent     |
| mo:available_as                                   | mo:Playlist    |
| mo:available_as                                   | mo:ED2K        |
| mo:image                                          |                |
| mo:track                                          | mo:Track       |
| hg:taggedWithTag                                  | hg:Tag         |
| <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |                |
| foaf:maker                                        | mo:MusicArtist |
----------------------------------------------------------------------
Properties of Records, ctd.
PREFIX   mo: <http://purl.org/ontology/mo/>
PREFIX   hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/>
PREFIX   foaf: <http://xmlns.com/foaf/0.1/>
PREFIX   dce: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT ?pred ?class
WHERE {
!    ?record a mo:Record ;
!    !     ?pred ?obj .
!    OPTIONAL {
!    !     ?obj a ?class .
!    }
} ORDER BY ASC(?pred) DESC(?class)
                                                                         ORDER BY statement
----------------------------------------------------------------------
| pred                                              | class          |
======================================================================
| dce:date                                          |                |
| dce:description                                   |                |
| dce:title                                         |                |
| mo:available_as                                   | mo:Torrent     |
| mo:available_as                                   | mo:Playlist    |
| mo:available_as                                   | mo:ED2K        |
| mo:image                                          |                |
| mo:track                                          | mo:Track       |
| hg:taggedWithTag                                  | hg:Tag         |
| <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |                |
| foaf:maker                                        | mo:MusicArtist |
----------------------------------------------------------------------
Properties of Records, ctd.
PREFIX   mo: <http://purl.org/ontology/mo/>
PREFIX   hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/>
PREFIX   foaf: <http://xmlns.com/foaf/0.1/>
PREFIX   dce: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT ?pred ?class
WHERE {
!    ?record a mo:Record ;
!    !     ?pred ?obj .
!    OPTIONAL {
!    !     ?obj a ?class .
!    }
} ORDER BY ASC(?pred) DESC(?class)
                                                                         ORDER BY statement
----------------------------------------------------------------------
| pred                                              | class          |
======================================================================
| dce:date                                          |                |
| dce:description                                   |                |
| dce:title                                         |                |
| mo:available_as                                   | mo:Torrent     |
| mo:available_as                                   | mo:Playlist    |
| mo:available_as                                   | mo:ED2K        |
| mo:image                                          |                |
| mo:track                                          | mo:Track       |
| hg:taggedWithTag                                  | hg:Tag         |
| <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |                |
| foaf:maker                                        | mo:MusicArtist |
----------------------------------------------------------------------
Problem: Wrong data format

 • date/time related functions in SPARQL expect
   dates in xsd:dateTime format:
   "2007-06-15T17:13:58"^^xsd:dateTime

 • however, source data has dates as plain literals
   with wrong format:
   "2007-06-15 17:13:58"
Fixing Data
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dce: <http://purl.org/dc/elements/1.1/>

CONSTRUCT {
!    ?s2 dce:date ?date_fixed .
}
WHERE {
!    ?s2 dce:date ?date .
!    BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed)
}
Fixing Data
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dce: <http://purl.org/dc/elements/1.1/>

CONSTRUCT {
!    ?s2 dce:date ?date_fixed .
}
WHERE {
!    ?s2 dce:date ?date .
!    BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed)
}
Fixing Data
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dce: <http://purl.org/dc/elements/1.1/>

CONSTRUCT {
!    ?s2 dce:date ?date_fixed .
}
WHERE {
!    ?s2 dce:date ?date .
!    BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed)
}
Fixing Data
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dce: <http://purl.org/dc/elements/1.1/>

CONSTRUCT {
!    ?s2 dce:date ?date_fixed .
}
WHERE {
!    ?s2 dce:date ?date .
!    BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed)
}
Fixing Data
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dce: <http://purl.org/dc/elements/1.1/>

CONSTRUCT {
!    ?s2 dce:date ?date_fixed .
}
WHERE {
!    ?s2 dce:date ?date .
!    BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed)
}
Fixing Data
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dce: <http://purl.org/dc/elements/1.1/>

CONSTRUCT {
!    ?s2 dce:date ?date_fixed .
}
WHERE {
!    ?s2 dce:date ?date .
!    BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed)
}




@prefix dce:     <http://purl.org/dc/elements/1.1/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .

<http://dbtune.org/jamendo/record/6015>
      dce:date      "2007-06-15T17:13:58"^^xsd:dateTime .

<http://dbtune.org/jamendo/record/6343>
      dce:date      "2007-07-05T19:32:23"^^xsd:dateTime .

<http://dbtune.org/jamendo/record/12863>
      dce:date      "2007-11-19T11:46:34"^^xsd:dateTime .

<http://dbtune.org/jamendo/record/3993>
      dce:date      "2007-02-01T18:08:28"^^xsd:dateTime .
Filtering Results
PREFIX dce: <http://purl.org/dc/elements/1.1/>

CONSTRUCT {
!    ?s ?p ?o .
}
WHERE {
!    ?s ?p ?o .
!    FILTER (?p != dce:date)
}
All albums for 2007/07
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?album ?title ?release_date
WHERE {
!    ?album a mo:Record ;
!    !     dce:date ?release_date ;
!    !     dce:title ?title .
!    FILTER (YEAR(?release_date) = 2007 && MONTH(?release_date) = 7)
}
ORDER BY ?release_date
All albums for 2007/07
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?album ?title ?release_date
WHERE {
!    ?album a mo:Record ;
!    !     dce:date ?release_date ;
!    !     dce:title ?title .
!    FILTER (YEAR(?release_date) = 2007 && MONTH(?release_date) = 7)
}
ORDER BY ?release_date




--------------------------------------------------------------------------------------------------------------------------
| album                                   | title                                  | release_date                        |
==========================================================================================================================
| <http://dbtune.org/jamendo/record/6310> | "Demo 2005"^^xsd:string                | "2007-07-04T16:24:23"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6320> | "Cinema"^^xsd:string                   | "2007-07-04T16:39:11"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6312> | "ECLECTEK II"^^xsd:string              | "2007-07-04T17:02:09"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6302> | "Unknow user"^^xsd:string              | "2007-07-04T18:06:18"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6323> | "girls always cry-xysides"^^xsd:string | "2007-07-04T23:16:26"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6327> | "Fest-noz is dead"^^xsd:string         | "2007-07-05T11:29:03"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6328> | "Félin Pour L'Autre"^^xsd:string       | "2007-07-05T13:04:37"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6250> | "BLAPP."^^xsd:string                   | "2007-07-05T14:18:11"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6332> | "Cà Phê and Pizza"^^xsd:string         | "2007-07-05T16:04:02"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6329> | "Life in Lento Violento"^^xsd:string   | "2007-07-05T16:39:17"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6336> | "Transition"^^xsd:string               | "2007-07-05T16:47:49"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6338> | "Die Zahl der Toten"^^xsd:string       | "2007-07-05T19:20:52"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6343> | "Offender Girl"^^xsd:string            | "2007-07-05T19:32:23"^^xsd:dateTime |
| <http://dbtune.org/jamendo/record/6377> | "Donne moi"^^xsd:string                | "2007-07-10T17:29:23"^^xsd:dateTime |
SPARQL
Federated Queries
Artists in France
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX mo:   <http://purl.org/ontology/mo/>

SELECT DISTINCT ?location
WHERE {
!    ?artist a mo:MusicArtist ;
!    !     foaf:based_near ?location .
}
Artists in France
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX mo:   <http://purl.org/ontology/mo/>

SELECT DISTINCT ?location
WHERE {
!    ?artist a mo:MusicArtist ;
!    !     foaf:based_near ?location .
}
Artists in France
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX mo:   <http://purl.org/ontology/mo/>

SELECT DISTINCT ?location
WHERE {
!    ?artist a mo:MusicArtist ;
!    !     foaf:based_near ?location .
}




--------------------------------------
| location                           |
======================================
| <http://sws.geonames.org/2661602/> |
| <http://sws.geonames.org/2997861/> |
| <http://sws.geonames.org/3013767/> |
| <http://sws.geonames.org/3013726/> |
| <http://sws.geonames.org/2802361/> |
| <http://sws.geonames.org/3026644/> |
| <http://sws.geonames.org/3017382/> |
| <http://sws.geonames.org/3865483/> |
| <http://sws.geonames.org/2968815/> |
| <http://sws.geonames.org/3013657/> |
| <http://sws.geonames.org/2987410/> |
| <http://sws.geonames.org/2750405/> |
| <http://sws.geonames.org/6424360/> |
| <http://sws.geonames.org/6556330/> |
| <http://sws.geonames.org/3213264/> |
| <http://sws.geonames.org/2967196/> |
Geonames SPARQL
       endpoints

• http://api.kasabi.com/dataset/geonames/apis/
  sparql
• http://factforge.net/sparql
Querying Remote Endpoint
SELECT DISTINCT ?pred
WHERE {
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?
apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98>
!    {
!    !     <http://sws.geonames.org/2661602/> ?pred ?obj .
!    }
}
Querying Remote Endpoint
SELECT DISTINCT ?pred
WHERE {
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?
apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98>
!    {
!    !     <http://sws.geonames.org/2661602/> ?pred ?obj .
!    }
}
Querying Remote Endpoint
SELECT DISTINCT ?pred
WHERE {
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?
apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98>
!    {
!    !     <http://sws.geonames.org/2661602/> ?pred ?obj .
!    }
}




-------------------------------------------------------
| pred                                                |
=======================================================
| <http://www.geonames.org/ontology#alternateName>    |
| <http://www.geonames.org/ontology#countryCode>      |
| <http://www.geonames.org/ontology#featureClass>     |
| <http://www.geonames.org/ontology#featureCode>      |
| <http://www.geonames.org/ontology#locationMap>      |
| <http://www.geonames.org/ontology#name>             |
| <http://www.geonames.org/ontology#parentADM1>       |
| <http://www.geonames.org/ontology#parentCountry>    |
| <http://www.geonames.org/ontology#parentFeature>    |
| <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>   |
| <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> |
| <http://www.w3.org/2003/01/geo/wgs84_pos#lat>       |
| <http://www.w3.org/2003/01/geo/wgs84_pos#long>      |
| <http://www.geonames.org/ontology#childrenFeatures> |
-------------------------------------------------------
Querying Remote Endpoint
SELECT DISTINCT ?pred
WHERE {
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?
apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98>
!    {
!    !     <http://sws.geonames.org/2661602/> ?pred ?obj .
!    }
}




-------------------------------------------------------
| pred                                                |
=======================================================
| <http://www.geonames.org/ontology#alternateName>    |
| <http://www.geonames.org/ontology#countryCode>      |
| <http://www.geonames.org/ontology#featureClass>     |
| <http://www.geonames.org/ontology#featureCode>      |
| <http://www.geonames.org/ontology#locationMap>      |
| <http://www.geonames.org/ontology#name>             |
| <http://www.geonames.org/ontology#parentADM1>       |
| <http://www.geonames.org/ontology#parentCountry>    |
| <http://www.geonames.org/ontology#parentFeature>    |
| <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>   |
| <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> |
| <http://www.w3.org/2003/01/geo/wgs84_pos#lat>       |
| <http://www.w3.org/2003/01/geo/wgs84_pos#long>      |
| <http://www.geonames.org/ontology#childrenFeatures> |
-------------------------------------------------------
Querying Remote Endpoint
SELECT DISTINCT ?pred
WHERE {
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?
apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98>
!    {
!    !     <http://sws.geonames.org/2661602/> ?pred ?obj .
!    }
}




-------------------------------------------------------
| pred                                                |
=======================================================
| <http://www.geonames.org/ontology#alternateName>    |
| <http://www.geonames.org/ontology#countryCode>      |
| <http://www.geonames.org/ontology#featureClass>     |
| <http://www.geonames.org/ontology#featureCode>      |
| <http://www.geonames.org/ontology#locationMap>      |
| <http://www.geonames.org/ontology#name>             |
| <http://www.geonames.org/ontology#parentADM1>       |
| <http://www.geonames.org/ontology#parentCountry>    |
| <http://www.geonames.org/ontology#parentFeature>    |
| <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>   |
| <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> |
| <http://www.w3.org/2003/01/geo/wgs84_pos#lat>       |
| <http://www.w3.org/2003/01/geo/wgs84_pos#long>      |
| <http://www.geonames.org/ontology#childrenFeatures> |
-------------------------------------------------------
Combining Local + Remote
PREFIX foaf: ! !     <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !   <http://www.geonames.org/ontology#>
PREFIX mo:   ! !     <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist ?name
WHERE {
!    ?artist a mo:MusicArtist ;
!    !     foaf:based_near ?location .
!    !
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?
apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98>
!    {
!    !     ?location geonames:name ?name .
!    }
!    !
}
LIMIT 50
Combining Local + Remote
PREFIX foaf: ! !         <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !       <http://www.geonames.org/ontology#>
PREFIX mo:   ! !         <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist ?name
WHERE {
!    ?artist a mo:MusicArtist ;
!    !     foaf:based_near ?location .
!    !
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?
apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98>
!    {
!    !     ?location geonames:name ?name .
!    }
!    !
}
LIMIT 50




-------------------------------------------------------------------------------------
| artist                                    | name                                  |
=====================================================================================
| <http://dbtune.org/jamendo/artist/5496>   | "Kanton Basel-Stadt"                  |
| <http://dbtune.org/jamendo/artist/256>    | "Département de la Loire-Atlantique" |
| <http://dbtune.org/jamendo/artist/337049> | "Département de la Haute-Garonne"     |
| <http://dbtune.org/jamendo/artist/8035>   | "Département des Hautes-Pyrénées"     |
| <http://dbtune.org/jamendo/artist/6260>   | "Kingdom of Belgium"                  |
| <http://dbtune.org/jamendo/artist/2471>   | "Département de la Charente-Maritime" |
| <http://dbtune.org/jamendo/artist/3572>   | "Republic of France"                  |
| <http://dbtune.org/jamendo/artist/4680>   | "Argentine Republic"                  |
What is France?
PREFIX geonames: <http://www.geonames.org/ontology#>

SELECT DISTINCT ?country ?name
WHERE {
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?
apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98>
!    {
!    !     SELECT DISTINCT ?country ?name
!    !     WHERE {
!    !     !    ?country geonames:featureCode geonames:A.PCLI ;
!    !     !    !     geonames:name ?name .
!    !     !    FILTER (regex(?name, "france", "i"))
!    !     }
!    }
}
ORDER BY ?name
What is France?
PREFIX geonames: <http://www.geonames.org/ontology#>

SELECT DISTINCT ?country ?name
WHERE {
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?
apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98>
!    {
!    !     SELECT DISTINCT ?country ?name
!    !     WHERE {
!    !     !    ?country geonames:featureCode geonames:A.PCLI ;
!    !     !    !     geonames:name ?name .
!    !     !    FILTER (regex(?name, "france", "i"))
!    !     }
!    }
}
ORDER BY ?name




-------------------------------------------------------------
| country                            | name                 |
=============================================================
| <http://sws.geonames.org/3017382/> | "Republic of France" |
-------------------------------------------------------------
Artists in France (1)
PREFIX foaf: ! !     <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !   <http://www.geonames.org/ontology#>
PREFIX mo:   ! !     <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist ?name
WHERE {
!    ?artist a mo:MusicArtist ;
!    !     foaf:based_near <http://sws.geonames.org/3017382/> ;
!    !     foaf:name ?name .
!    !
}
ORDER BY ?name
Artists in France (1)
PREFIX foaf: ! !         <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !       <http://www.geonames.org/ontology#>
PREFIX mo:   ! !         <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist ?name
WHERE {
!    ?artist a mo:MusicArtist ;
!    !     foaf:based_near <http://sws.geonames.org/3017382/> ;
!    !     foaf:name ?name .
!    !
}
ORDER BY ?name




-------------------------------------------------------------------------------------------------------------------
| artist                                    | name                                                                |
===================================================================================================================
| <http://dbtune.org/jamendo/artist/3972>   | "#2 Orchestra"^^<http://www.w3.org/2001/XMLSchema#string>           |
| <http://dbtune.org/jamendo/artist/5865>   | "(own+line)"^^<http://www.w3.org/2001/XMLSchema#string>             |
| <http://dbtune.org/jamendo/artist/4779>   | "7BZH"^^<http://www.w3.org/2001/XMLSchema#string>                   |
| <http://dbtune.org/jamendo/artist/3297>   | "AMarie.C"^^<http://www.w3.org/2001/XMLSchema#string>               |
| <http://dbtune.org/jamendo/artist/754>    | "Adam Lwo"^^<http://www.w3.org/2001/XMLSchema#string>               |
| <http://dbtune.org/jamendo/artist/4825>   | "Alteranti"^^<http://www.w3.org/2001/XMLSchema#string>              |
| <http://dbtune.org/jamendo/artist/784>    | "Ataraxia Rebel Force"^^<http://www.w3.org/2001/XMLSchema#string>   |
| <http://dbtune.org/jamendo/artist/289>    | "Auto/Sexual"^^<http://www.w3.org/2001/XMLSchema#string>            |
| <http://dbtune.org/jamendo/artist/565>    | "BUREAU DES FLUIDES"^^<http://www.w3.org/2001/XMLSchema#string>     |
| <http://dbtune.org/jamendo/artist/336803> | "Baron Baroff"^^<http://www.w3.org/2001/XMLSchema#string>           |
| <http://dbtune.org/jamendo/artist/8316>   | "Bertrand Homassel"^^<http://www.w3.org/2001/XMLSchema#string>      |
| <http://dbtune.org/jamendo/artist/274>    | "Bleacher"^^<http://www.w3.org/2001/XMLSchema#string>               |
| <http://dbtune.org/jamendo/artist/3835>   | "Brigade Neurale"^^<http://www.w3.org/2001/XMLSchema#string>        |
Artists in France (2)
PREFIX foaf: ! !     <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !   <http://www.geonames.org/ontology#>
PREFIX mo:   ! !     <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist ?name ?place ?place_name
WHERE {
!    ?artist a mo:MusicArtist ;
!    !     foaf:based_near ?place ;
!    !     foaf:name ?name .
!
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?apikey=APIKEY>
!    {
!    !     ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     !    geonames:name ?place_name .
!    }
!    !
}
ORDER BY ?name
LIMIT 10
Artists in France (2)
PREFIX foaf: ! !     <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !   <http://www.geonames.org/ontology#>
PREFIX mo:   ! !     <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist ?name ?place ?place_name
WHERE {
!    ?artist a mo:MusicArtist ;
!    !     foaf:based_near ?place ;
!    !     foaf:name ?name .
!
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?apikey=APIKEY>
!    {
!    !     ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     !    geonames:name ?place_name .
!    }
!    !
}
ORDER BY ?name
LIMIT 10
Places in France
PREFIX geonames: !   <http://www.geonames.org/ontology#>

CONSTRUCT {
!    ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     geonames:name ?name .
}
WHERE {
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?apikey=APIKEY>
!    {
!    !     ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     !    geonames:name ?name .
!    }!    !
}
Places in France
PREFIX geonames: !        <http://www.geonames.org/ontology#>

CONSTRUCT {
!    ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     geonames:name ?name .
}
WHERE {
!    SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?apikey=APIKEY>
!    {
!    !     ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     !    geonames:name ?name .
!    }!    !
}




@prefix geonames:   <http://www.geonames.org/ontology#> .

<http://sws.geonames.org/3003977/>
      geonames:name "Le Grand Merimont" ;
      geonames:parentCountry
                    <http://sws.geonames.org/3017382/> .

<http://sws.geonames.org/2994812/>
      geonames:name "Mean-Ruz" ;
      geonames:parentCountry
                    <http://sws.geonames.org/3017382/> .

<http://sws.geonames.org/7535264/>
      geonames:name "Golf du Prieuré" ;
      geonames:parentCountry
                    <http://sws.geonames.org/3017382/> .
Et voilà - Les artistes de France!
PREFIX foaf: ! !     <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !   <http://www.geonames.org/ontology#>
PREFIX mo:   ! !     <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist_name ?place_name
FROM <../data/jamendo-rdf/jamendo.nt>
FROM <../data/in_france.nt>
WHERE {
 !   ?artist a mo:MusicArtist ;
 !   !     foaf:based_near ?place ;
 !   !     foaf:name ?artist_name .
!    ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     geonames:name ?place_name .
}
ORDER BY ?artist_name
Et voilà - Les artistes de France!
PREFIX foaf: ! !         <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !       <http://www.geonames.org/ontology#>
PREFIX mo:   ! !         <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist_name ?place_name
FROM <../data/jamendo-rdf/jamendo.nt>
FROM <../data/in_france.nt>
WHERE {
 !   ?artist a mo:MusicArtist ;
 !   !     foaf:based_near ?place ;
 !   !     foaf:name ?artist_name .
!    ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     geonames:name ?place_name .
}
ORDER BY ?artist_name




----------------------------------------------------------------------------------------------------------------
| artist_name                                                              | place_name                        |
================================================================================================================
| "#2 Orchestra"^^<http://www.w3.org/2001/XMLSchema#string>                | "Republic of France"              |
| "#Blockout"^^<http://www.w3.org/2001/XMLSchema#string>                   | "Département des Yvelines"        |
| "#Dance 75#"^^<http://www.w3.org/2001/XMLSchema#string>                  | "Paris"                           |
| "#NarNaoud#"^^<http://www.w3.org/2001/XMLSchema#string>                  | "Département de la Gironde"       |
| "#ZedMeta#"^^<http://www.w3.org/2001/XMLSchema#string>                   | "Paris"                           |
| "#Zorglups#"^^<http://www.w3.org/2001/XMLSchema#string>                  | "Département de l'Essonne"        |
| "&ND"^^<http://www.w3.org/2001/XMLSchema#string>                         | "Paris"                           |
| "(own+line)"^^<http://www.w3.org/2001/XMLSchema#string>                  | "Republic of France"              |
| "* Q u i r y *"^^<http://www.w3.org/2001/XMLSchema#string>               | "Paris"                           |
| "-=Kwada=-"^^<http://www.w3.org/2001/XMLSchema#string>                   | "Département de la Haute-Garonne" |
| "-DEMO-"^^<http://www.w3.org/2001/XMLSchema#string>                      | "Département du Nord"             |
Et voilà - Les artistes de France!
PREFIX foaf: ! !         <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !       <http://www.geonames.org/ontology#>
PREFIX mo:   ! !         <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist_name ?place_name
FROM <../data/jamendo-rdf/jamendo.nt>
FROM <../data/in_france.nt>
WHERE {
 !   ?artist a mo:MusicArtist ;
 !   !     foaf:based_near ?place ;
 !   !     foaf:name ?artist_name .
!    ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     geonames:name ?place_name .
}
ORDER BY ?artist_name




----------------------------------------------------------------------------------------------------------------
| artist_name                                                              | place_name                        |
================================================================================================================
| "#2 Orchestra"^^<http://www.w3.org/2001/XMLSchema#string>                | "Republic of France"              |
| "#Blockout"^^<http://www.w3.org/2001/XMLSchema#string>                   | "Département des Yvelines"        |
| "#Dance 75#"^^<http://www.w3.org/2001/XMLSchema#string>                  | "Paris"                           |
| "#NarNaoud#"^^<http://www.w3.org/2001/XMLSchema#string>                  | "Département de la Gironde"       |
| "#ZedMeta#"^^<http://www.w3.org/2001/XMLSchema#string>                   | "Paris"                           |
| "#Zorglups#"^^<http://www.w3.org/2001/XMLSchema#string>                  | "Département de l'Essonne"        |
| "&ND"^^<http://www.w3.org/2001/XMLSchema#string>                         | "Paris"                           |
| "(own+line)"^^<http://www.w3.org/2001/XMLSchema#string>                  | "Republic of France"              |
| "* Q u i r y *"^^<http://www.w3.org/2001/XMLSchema#string>               | "Paris"                           |
| "-=Kwada=-"^^<http://www.w3.org/2001/XMLSchema#string>                   | "Département de la Haute-Garonne" |
| "-DEMO-"^^<http://www.w3.org/2001/XMLSchema#string>                      | "Département du Nord"             |
One more thing...
PREFIX foaf: ! !     <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !   <http://www.geonames.org/ontology#>
PREFIX mo:   ! !     <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist_name ?place_name
FROM <../data/jamendo-rdf/jamendo.nt>
FROM NAMED <../data/in_france.nt>
WHERE {
 !   ?artist a mo:MusicArtist ;
 !   !     foaf:based_near ?place ;
 !   !     foaf:name ?artist_name .
!    GRAPH <../data/in_france.nt> {
!    !     ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     !    geonames:name ?place_name .
!    }
}
ORDER BY ?artist_name
One more thing...
PREFIX foaf: ! !     <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !   <http://www.geonames.org/ontology#>
PREFIX mo:   ! !     <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist_name ?place_name
FROM <../data/jamendo-rdf/jamendo.nt>
FROM NAMED <../data/in_france.nt>
WHERE {
 !   ?artist a mo:MusicArtist ;
 !   !     foaf:based_near ?place ;
 !   !     foaf:name ?artist_name .
!    GRAPH <../data/in_france.nt> {
!    !     ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     !    geonames:name ?place_name .
!    }
}
ORDER BY ?artist_name
One more thing...
PREFIX foaf: ! !     <http://xmlns.com/foaf/0.1/>
PREFIX geonames: !   <http://www.geonames.org/ontology#>
PREFIX mo:   ! !     <http://purl.org/ontology/mo/>

SELECT DISTINCT ?artist_name ?place_name
FROM <../data/jamendo-rdf/jamendo.nt>
FROM NAMED <../data/in_france.nt>
WHERE {
 !   ?artist a mo:MusicArtist ;
 !   !     foaf:based_near ?place ;
 !   !     foaf:name ?artist_name .
!    GRAPH <../data/in_france.nt> {
!    !     ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ;
!    !     !    geonames:name ?place_name .
!    }
}
ORDER BY ?artist_name
One last thing...
PREFIX swrc: <http://swrc.ontoware.org/ontology#>
PREFIX org: <http://data.semanticweb.org/organization/>

SELECT ?affiliation ?conference_graph
WHERE {
!    SERVICE <http://data.semanticweb.org/sparql> {
!    !     GRAPH ?conference_graph {
!    !     !    <http://data.semanticweb.org/person/richard-cyganiak> swrc:affiliation ?affiliation .
!    !     }
!    }
}
One last thing...
PREFIX swrc: <http://swrc.ontoware.org/ontology#>
PREFIX org: <http://data.semanticweb.org/organization/>

SELECT ?affiliation ?conference_graph
WHERE {
!    SERVICE <http://data.semanticweb.org/sparql> {
!    !     GRAPH ?conference_graph {
!    !     !    <http://data.semanticweb.org/person/richard-cyganiak> swrc:affiliation ?affiliation .
!    !     }
!    }
}
SPARQL - Basic and Federated Queries
SPARQL - Basic and Federated Queries
SPARQL - Basic and Federated Queries

Weitere ähnliche Inhalte

Was ist angesagt?

Custom PDFs from the DITA OT
Custom PDFs from the DITA OTCustom PDFs from the DITA OT
Custom PDFs from the DITA OTLeigh White
 
An Introduction to SPARQL
An Introduction to SPARQLAn Introduction to SPARQL
An Introduction to SPARQLOlaf Hartig
 
SparkSQL: A Compiler from Queries to RDDs
SparkSQL: A Compiler from Queries to RDDsSparkSQL: A Compiler from Queries to RDDs
SparkSQL: A Compiler from Queries to RDDsDatabricks
 
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
 Best Practice of Compression/Decompression Codes in Apache Spark with Sophia... Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...Databricks
 
Introduction To RDF and RDFS
Introduction To RDF and RDFSIntroduction To RDF and RDFS
Introduction To RDF and RDFSNilesh Wagmare
 
Jena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaJena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaAleksander Pohl
 
PySpark 배우기 Ch 06. ML 패키지 소개하기
PySpark 배우기 Ch 06. ML 패키지 소개하기PySpark 배우기 Ch 06. ML 패키지 소개하기
PySpark 배우기 Ch 06. ML 패키지 소개하기찬희 이
 
Introduction to RDF & SPARQL
Introduction to RDF & SPARQLIntroduction to RDF & SPARQL
Introduction to RDF & SPARQLOpen Data Support
 
DB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource ManagerDB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource ManagerAndrejs Vorobjovs
 
Inside PostgreSQL Shared Memory
Inside PostgreSQL Shared MemoryInside PostgreSQL Shared Memory
Inside PostgreSQL Shared MemoryEDB
 
Troubleshooting Tips and Tricks for Database 19c - EMEA Tour Oct 2019
Troubleshooting Tips and Tricks for Database 19c - EMEA Tour  Oct 2019Troubleshooting Tips and Tricks for Database 19c - EMEA Tour  Oct 2019
Troubleshooting Tips and Tricks for Database 19c - EMEA Tour Oct 2019Sandesh Rao
 
SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)Thomas Francart
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Databricks
 
Apache Calcite: One planner fits all
Apache Calcite: One planner fits allApache Calcite: One planner fits all
Apache Calcite: One planner fits allJulian Hyde
 
Protect your Private Data in your Hadoop Clusters with ORC Column Encryption
Protect your Private Data in your Hadoop Clusters with ORC Column EncryptionProtect your Private Data in your Hadoop Clusters with ORC Column Encryption
Protect your Private Data in your Hadoop Clusters with ORC Column EncryptionDataWorks Summit
 

Was ist angesagt? (20)

Custom PDFs from the DITA OT
Custom PDFs from the DITA OTCustom PDFs from the DITA OT
Custom PDFs from the DITA OT
 
An Introduction to SPARQL
An Introduction to SPARQLAn Introduction to SPARQL
An Introduction to SPARQL
 
HiveServer2
HiveServer2HiveServer2
HiveServer2
 
SparkSQL: A Compiler from Queries to RDDs
SparkSQL: A Compiler from Queries to RDDsSparkSQL: A Compiler from Queries to RDDs
SparkSQL: A Compiler from Queries to RDDs
 
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
 Best Practice of Compression/Decompression Codes in Apache Spark with Sophia... Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
 
Introduction To RDF and RDFS
Introduction To RDF and RDFSIntroduction To RDF and RDFS
Introduction To RDF and RDFS
 
Jena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaJena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for Java
 
RDF, linked data and semantic web
RDF, linked data and semantic webRDF, linked data and semantic web
RDF, linked data and semantic web
 
PySpark 배우기 Ch 06. ML 패키지 소개하기
PySpark 배우기 Ch 06. ML 패키지 소개하기PySpark 배우기 Ch 06. ML 패키지 소개하기
PySpark 배우기 Ch 06. ML 패키지 소개하기
 
Introduction to RDF & SPARQL
Introduction to RDF & SPARQLIntroduction to RDF & SPARQL
Introduction to RDF & SPARQL
 
DB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource ManagerDB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource Manager
 
Inside PostgreSQL Shared Memory
Inside PostgreSQL Shared MemoryInside PostgreSQL Shared Memory
Inside PostgreSQL Shared Memory
 
Troubleshooting Tips and Tricks for Database 19c - EMEA Tour Oct 2019
Troubleshooting Tips and Tricks for Database 19c - EMEA Tour  Oct 2019Troubleshooting Tips and Tricks for Database 19c - EMEA Tour  Oct 2019
Troubleshooting Tips and Tricks for Database 19c - EMEA Tour Oct 2019
 
RDF data validation 2017 SHACL
RDF data validation 2017 SHACLRDF data validation 2017 SHACL
RDF data validation 2017 SHACL
 
SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)
 
Solr Presentation
Solr PresentationSolr Presentation
Solr Presentation
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
 
Apache Calcite: One planner fits all
Apache Calcite: One planner fits allApache Calcite: One planner fits all
Apache Calcite: One planner fits all
 
Toward Better Multi-Tenancy Support from HDFS
Toward Better Multi-Tenancy Support from HDFSToward Better Multi-Tenancy Support from HDFS
Toward Better Multi-Tenancy Support from HDFS
 
Protect your Private Data in your Hadoop Clusters with ORC Column Encryption
Protect your Private Data in your Hadoop Clusters with ORC Column EncryptionProtect your Private Data in your Hadoop Clusters with ORC Column Encryption
Protect your Private Data in your Hadoop Clusters with ORC Column Encryption
 

Andere mochten auch

Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...Olaf Hartig
 
Link Analysis of Life Sciences Linked Data
Link Analysis of Life Sciences Linked DataLink Analysis of Life Sciences Linked Data
Link Analysis of Life Sciences Linked DataMichel Dumontier
 
Life Sciences: Leveraging Customer Data for Commercial Success
Life Sciences: Leveraging Customer Data for Commercial SuccessLife Sciences: Leveraging Customer Data for Commercial Success
Life Sciences: Leveraging Customer Data for Commercial SuccessCognizant
 
Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013François Belleau
 
SPARQL, comment illuminer vos mashups en consommant les données du Linked Data ?
SPARQL, comment illuminer vos mashups en consommant les données du Linked Data ?SPARQL, comment illuminer vos mashups en consommant les données du Linked Data ?
SPARQL, comment illuminer vos mashups en consommant les données du Linked Data ?Antidot
 
How hard is this Query? Measuring the Semantic Complexity of Schema-agnostic ...
How hard is this Query? Measuring the Semantic Complexity of Schema-agnostic ...How hard is this Query? Measuring the Semantic Complexity of Schema-agnostic ...
How hard is this Query? Measuring the Semantic Complexity of Schema-agnostic ...Andre Freitas
 
Representing Texts as contextualized Entity Centric Linked Data Graphs
Representing Texts as contextualized Entity Centric Linked Data GraphsRepresenting Texts as contextualized Entity Centric Linked Data Graphs
Representing Texts as contextualized Entity Centric Linked Data GraphsAndre Freitas
 
Schema-agnositc queries over large-schema databases: a distributional semanti...
Schema-agnositc queries over large-schema databases: a distributional semanti...Schema-agnositc queries over large-schema databases: a distributional semanti...
Schema-agnositc queries over large-schema databases: a distributional semanti...Andre Freitas
 
WiSS Challenge - Day 2
WiSS Challenge - Day 2WiSS Challenge - Day 2
WiSS Challenge - Day 2Andre Freitas
 
Different Semantic Perspectives for Question Answering Systems
Different Semantic Perspectives for Question Answering SystemsDifferent Semantic Perspectives for Question Answering Systems
Different Semantic Perspectives for Question Answering SystemsAndre Freitas
 
Open Education Challenge 2014: exploiting Linked Data in Educational Applicat...
Open Education Challenge 2014: exploiting Linked Data in Educational Applicat...Open Education Challenge 2014: exploiting Linked Data in Educational Applicat...
Open Education Challenge 2014: exploiting Linked Data in Educational Applicat...Stefan Dietze
 
DBpedia: A Public Data Infrastructure for the Web of Data
DBpedia: A Public Data Infrastructure for the Web of DataDBpedia: A Public Data Infrastructure for the Web of Data
DBpedia: A Public Data Infrastructure for the Web of DataSebastian Hellmann
 
Introduction to the Data Web, DBpedia and the Life-cycle of Linked Data
Introduction to the Data Web, DBpedia and the Life-cycle of Linked DataIntroduction to the Data Web, DBpedia and the Life-cycle of Linked Data
Introduction to the Data Web, DBpedia and the Life-cycle of Linked DataSören Auer
 
Evaluating Named Entity Recognition and Disambiguation in News and Tweets
Evaluating Named Entity Recognition and Disambiguation in News and TweetsEvaluating Named Entity Recognition and Disambiguation in News and Tweets
Evaluating Named Entity Recognition and Disambiguation in News and TweetsMarieke van Erp
 

Andere mochten auch (20)

Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
 
Link Analysis of Life Sciences Linked Data
Link Analysis of Life Sciences Linked DataLink Analysis of Life Sciences Linked Data
Link Analysis of Life Sciences Linked Data
 
SPARQL Cheat Sheet
SPARQL Cheat SheetSPARQL Cheat Sheet
SPARQL Cheat Sheet
 
ontop: A tutorial
ontop: A tutorialontop: A tutorial
ontop: A tutorial
 
Life Sciences: Leveraging Customer Data for Commercial Success
Life Sciences: Leveraging Customer Data for Commercial SuccessLife Sciences: Leveraging Customer Data for Commercial Success
Life Sciences: Leveraging Customer Data for Commercial Success
 
Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013
 
SPARQL, comment illuminer vos mashups en consommant les données du Linked Data ?
SPARQL, comment illuminer vos mashups en consommant les données du Linked Data ?SPARQL, comment illuminer vos mashups en consommant les données du Linked Data ?
SPARQL, comment illuminer vos mashups en consommant les données du Linked Data ?
 
Introduction of Linked Data for Science
Introduction of Linked Data for ScienceIntroduction of Linked Data for Science
Introduction of Linked Data for Science
 
How hard is this Query? Measuring the Semantic Complexity of Schema-agnostic ...
How hard is this Query? Measuring the Semantic Complexity of Schema-agnostic ...How hard is this Query? Measuring the Semantic Complexity of Schema-agnostic ...
How hard is this Query? Measuring the Semantic Complexity of Schema-agnostic ...
 
Representing Texts as contextualized Entity Centric Linked Data Graphs
Representing Texts as contextualized Entity Centric Linked Data GraphsRepresenting Texts as contextualized Entity Centric Linked Data Graphs
Representing Texts as contextualized Entity Centric Linked Data Graphs
 
Schema-agnositc queries over large-schema databases: a distributional semanti...
Schema-agnositc queries over large-schema databases: a distributional semanti...Schema-agnositc queries over large-schema databases: a distributional semanti...
Schema-agnositc queries over large-schema databases: a distributional semanti...
 
WiSS Challenge - Day 2
WiSS Challenge - Day 2WiSS Challenge - Day 2
WiSS Challenge - Day 2
 
Life Sciences Linked Data
Life Sciences Linked DataLife Sciences Linked Data
Life Sciences Linked Data
 
Different Semantic Perspectives for Question Answering Systems
Different Semantic Perspectives for Question Answering SystemsDifferent Semantic Perspectives for Question Answering Systems
Different Semantic Perspectives for Question Answering Systems
 
Open Education Challenge 2014: exploiting Linked Data in Educational Applicat...
Open Education Challenge 2014: exploiting Linked Data in Educational Applicat...Open Education Challenge 2014: exploiting Linked Data in Educational Applicat...
Open Education Challenge 2014: exploiting Linked Data in Educational Applicat...
 
DBpedia: A Public Data Infrastructure for the Web of Data
DBpedia: A Public Data Infrastructure for the Web of DataDBpedia: A Public Data Infrastructure for the Web of Data
DBpedia: A Public Data Infrastructure for the Web of Data
 
DBpedia InsideOut
DBpedia InsideOutDBpedia InsideOut
DBpedia InsideOut
 
Introduction to the Data Web, DBpedia and the Life-cycle of Linked Data
Introduction to the Data Web, DBpedia and the Life-cycle of Linked DataIntroduction to the Data Web, DBpedia and the Life-cycle of Linked Data
Introduction to the Data Web, DBpedia and the Life-cycle of Linked Data
 
Evaluating Named Entity Recognition and Disambiguation in News and Tweets
Evaluating Named Entity Recognition and Disambiguation in News and TweetsEvaluating Named Entity Recognition and Disambiguation in News and Tweets
Evaluating Named Entity Recognition and Disambiguation in News and Tweets
 
NLP todo
NLP todoNLP todo
NLP todo
 

Ähnlich wie SPARQL - Basic and Federated Queries

ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQLESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQLeswcsummerschool
 
Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02eswcsummerschool
 
Combining Social Music and Semantic Web for music-related recommender systems
Combining Social Music and Semantic Web for music-related recommender systemsCombining Social Music and Semantic Web for music-related recommender systems
Combining Social Music and Semantic Web for music-related recommender systemsAlexandre Passant
 
Yokohama Art Spot meets SPARQL
Yokohama Art Spot meets SPARQLYokohama Art Spot meets SPARQL
Yokohama Art Spot meets SPARQLFuyuko Matsumura
 
Real-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter AnnotationsReal-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter AnnotationsJoshua Shinavier
 
Linking the world with Python and Semantics
Linking the world with Python and SemanticsLinking the world with Python and Semantics
Linking the world with Python and SemanticsTatiana Al-Chueyr
 
SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)andyseaborne
 
Dependency Parsing-based QA System for RDF and SPARQL
Dependency Parsing-based QA System for RDF and SPARQLDependency Parsing-based QA System for RDF and SPARQL
Dependency Parsing-based QA System for RDF and SPARQLFariz Darari
 

Ähnlich wie SPARQL - Basic and Federated Queries (11)

ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQLESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
 
Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02
 
Combining Social Music and Semantic Web for music-related recommender systems
Combining Social Music and Semantic Web for music-related recommender systemsCombining Social Music and Semantic Web for music-related recommender systems
Combining Social Music and Semantic Web for music-related recommender systems
 
FOAF & SIOC applications
FOAF & SIOC applicationsFOAF & SIOC applications
FOAF & SIOC applications
 
Yokohama Art Spot meets SPARQL
Yokohama Art Spot meets SPARQLYokohama Art Spot meets SPARQL
Yokohama Art Spot meets SPARQL
 
Real-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter AnnotationsReal-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter Annotations
 
Querying Linked Data
Querying Linked DataQuerying Linked Data
Querying Linked Data
 
Linking the world with Python and Semantics
Linking the world with Python and SemanticsLinking the world with Python and Semantics
Linking the world with Python and Semantics
 
SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)
 
Dependency Parsing-based QA System for RDF and SPARQL
Dependency Parsing-based QA System for RDF and SPARQLDependency Parsing-based QA System for RDF and SPARQL
Dependency Parsing-based QA System for RDF and SPARQL
 
RDFa Everywhere
RDFa EverywhereRDFa Everywhere
RDFa Everywhere
 

Mehr von Knud Möller

Digitales Graffiti und vernetzte Daten für digitale Städte
Digitales Graffiti und vernetzte Daten für digitale StädteDigitales Graffiti und vernetzte Daten für digitale Städte
Digitales Graffiti und vernetzte Daten für digitale StädteKnud Möller
 
EU Data Cloud - On to the Cloud
EU Data Cloud - On to the CloudEU Data Cloud - On to the Cloud
EU Data Cloud - On to the CloudKnud Möller
 
The EU Data Cloud - Introduction
The EU Data Cloud - IntroductionThe EU Data Cloud - Introduction
The EU Data Cloud - IntroductionKnud Möller
 
History and Background of the USEWOD Data Challenge
History and Background of the  USEWOD Data ChallengeHistory and Background of the  USEWOD Data Challenge
History and Background of the USEWOD Data ChallengeKnud Möller
 
The Kasabi Information Marketplace
The Kasabi Information MarketplaceThe Kasabi Information Marketplace
The Kasabi Information MarketplaceKnud Möller
 
Executive Whispering for Linked Data
Executive Whispering for Linked DataExecutive Whispering for Linked Data
Executive Whispering for Linked DataKnud Möller
 
The Semantic Web (and what it can deliver for your business)
The Semantic Web (and what it can deliver for your business)The Semantic Web (and what it can deliver for your business)
The Semantic Web (and what it can deliver for your business)Knud Möller
 

Mehr von Knud Möller (9)

daten.berlin.de
daten.berlin.dedaten.berlin.de
daten.berlin.de
 
Linked GeoRef
Linked GeoRefLinked GeoRef
Linked GeoRef
 
Digitales Graffiti und vernetzte Daten für digitale Städte
Digitales Graffiti und vernetzte Daten für digitale StädteDigitales Graffiti und vernetzte Daten für digitale Städte
Digitales Graffiti und vernetzte Daten für digitale Städte
 
EU Data Cloud - On to the Cloud
EU Data Cloud - On to the CloudEU Data Cloud - On to the Cloud
EU Data Cloud - On to the Cloud
 
The EU Data Cloud - Introduction
The EU Data Cloud - IntroductionThe EU Data Cloud - Introduction
The EU Data Cloud - Introduction
 
History and Background of the USEWOD Data Challenge
History and Background of the  USEWOD Data ChallengeHistory and Background of the  USEWOD Data Challenge
History and Background of the USEWOD Data Challenge
 
The Kasabi Information Marketplace
The Kasabi Information MarketplaceThe Kasabi Information Marketplace
The Kasabi Information Marketplace
 
Executive Whispering for Linked Data
Executive Whispering for Linked DataExecutive Whispering for Linked Data
Executive Whispering for Linked Data
 
The Semantic Web (and what it can deliver for your business)
The Semantic Web (and what it can deliver for your business)The Semantic Web (and what it can deliver for your business)
The Semantic Web (and what it can deliver for your business)
 

Kürzlich hochgeladen

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Kürzlich hochgeladen (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

SPARQL - Basic and Federated Queries

  • 1. SPARQL - Query Basics and Federated Queries Knud Möller, Talis Systems Ltd. @knudmoeller 16 April 2012 Tutorial: Practical Cross-Dataset Queries on the Web of Data WWW2012, Lyon, France
  • 2. What is SPARQL? • query language for RDF graphs (i.e., linked data) • get specific information out of a dataset (or several datasets) • “The SQL for the Web of Data” LQRA P S
  • 3. History • 2004: work started on SPARQL • 2008: SPARQL 1.0 finished (W3C Rec) • 2009: work started on SPARQL 1.1 • 2012 (now): SPARQL 1.1 almost finished • soon: SPARQL 1.1 finished
  • 4. SPARQL Endpoint SPARQL Endpoint Query in Result back
  • 5. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX dce: <http://purl.org/dc/elements/1.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?album ?title ?release_date WHERE { ! ?album a mo:Record ; ! ! dce:date ?release_date ; ! ! dce:title ?title . ! FILTER (year(?release_date) = 2007 && month(?release_date) = 7) } ORDER BY ?release_date
  • 6. SPARQL in a Nutshell 1 query clause 2 WHERE clause
  • 7. SPARQL in a Nutshell What do I want to get back? • SELECT: list of things • DESCRIBE: RDF graph for one resource • CONSTRUCT: custom RDF graph 1 query clause • ASK: boolean value (true or false) 2 WHERE clause
  • 8. SPARQL in a Nutshell What do I want to get back? • SELECT: list of things • DESCRIBE: RDF graph for one resource • CONSTRUCT: custom RDF graph 1 query clause • ASK: boolean value (true or false) 2 WHERE clause Which part of the graph am I looking for? • WHERE • triple patterns • graph patterns
  • 9. SPARQL in a Nutshell What do I want to get back? • SELECT: list of things • DESCRIBE: RDF graph for one 0 Prologue resource • CONSTRUCT: custom RDF graph 1 query clause • ASK: boolean value (true or false) 2 WHERE clause Which part of the graph am I looking for? • WHERE • triple patterns • graph patterns
  • 10. SPARQL in a Nutshell What do I want to get back? • SELECT: list of things • DESCRIBE: RDF graph for one 0 Prologue resource • CONSTRUCT: custom RDF graph 1 query clause • ASK: boolean value (true or false) 2 WHERE clause Which part of the graph am I looking for? • WHERE 3 Modifiers • triple patterns • graph patterns
  • 11. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX dce: <http://purl.org/dc/elements/1.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?album ?title ?release_date WHERE { ! ?album a mo:Record ; ! ! dce:date ?release_date ; ! ! dce:title ?title . ! FILTER (year(?release_date) = 2007 && month(?release_date) = 7) } ORDER BY ?release_date
  • 12. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX dce: <http://purl.org/dc/elements/1.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?album ?title ?release_date WHERE { ! ?album a mo:Record ; ! ! dce:date ?release_date ; ! ! dce:title ?title . ! FILTER (year(?release_date) = 2007 && month(?release_date) = 7) } ORDER BY ?release_date
  • 13. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX dce: <http://purl.org/dc/elements/1.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?album ?title ?release_date WHERE { ! ?album a mo:Record ; ! ! dce:date ?release_date ; ! ! dce:title ?title . ! FILTER (year(?release_date) = 2007 && month(?release_date) = 7) } ORDER BY ?release_date
  • 14. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX dce: <http://purl.org/dc/elements/1.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?album ?title ?release_date WHERE { ! ?album a mo:Record ; graph pattern ! ! dce:date ?release_date ; ! ! dce:title ?title . ! FILTER (year(?release_date) = 2007 && month(?release_date) = 7) } ORDER BY ?release_date
  • 15. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX dce: <http://purl.org/dc/elements/1.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?album ?title ?release_date WHERE { ! ?album a mo:Record ; graph pattern ! ! dce:date ?release_date ; ! ! dce:title ?title . ! FILTER (year(?release_date) = 2007 && month(?release_date) = 7) } ORDER BY ?release_date
  • 16. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX dce: <http://purl.org/dc/elements/1.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?album ?title ?release_date WHERE { ! ?album a mo:Record ; graph pattern ! ! dce:date ?release_date ; ! ! dce:title ?title . ! FILTER (year(?release_date) = 2007 && month(?release_date) = 7) } ORDER BY ?release_date
  • 17. Example Data • from music site Jamendo: http://ww.jamendo.com • linked data at DBTune: http://dbtune.org/jamendo/ • thousands of artists with albums, tracks, etc. • additionally, some geographical data from Geonames: http://www.geonames.org/
  • 18.
  • 19. http:// http:// http:// Whiteshoulders www.petithomme.org Petit Homme img.jamendo.com/ blackshoulders.hautetfort.com/ artists/w/white- shoulders.jpg foaf:name foaf:homepage foaf:name foaf:homepage mo:MusicArtist foaf:img a a artists:3908 records:4092 foaf:made artists:3732 foaf:based_near foaf:made foaf:made foaf:made foaf:based_near locations:3019599/ foaf:img records:6361 records:4295 foaf:made records:3604 foaf:made records:3738 mo:Record http:// foaf:maker W (EP) img.jamendo.com/ artists/p/ a dce:title petit.homme.gif hg:taggedWithTag records:8836 dce:date 2007-10-09T15:58:17 tags:noisy hg:taggedWithTag mo:track tags:electro mo:track hg:taggedWithTag tracks:90508 mo:track mo:track hg:taggedWithTag tracks:90496 tags:experimental tracks:90504 tracks:90510 tags:noise
  • 20. @base <http://dbtune.org/jamendo/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix mo: <http://purl.org/ontology/mo/> . @prefix dce: <http://purl.org/dc/elements/1.1/> . @prefix hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> . @prefix tags: <tag/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <artist/3908> a mo:MusicArtist ; foaf:based_near <http://sws.geonames.org/3019599/> ; foaf:homepage <http://www.petithomme.org> ; foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> ; foaf:made <record/3604>, <record/4295> ; foaf:name "Petit Homme"^^xsd:string . <artist/3732> Text a mo:MusicArtist ; foaf:based_near <http://sws.geonames.org/3019599/> ; foaf:homepage <http://blackshoulders.hautetfort.com/> ; foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> ; foaf:made <record/3738>, <record/4092>, <record/6361>, <record/8836> ; foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime ; dce:title "W (EP)"^^xsd:string ; mo:track <track/90496>, <track/90504>, <track/90508>, <track/90510> ; hg:taggedWithTag tags:electro, tags:experimental, tags:noise, tags:noisy ; a mo:Record ; foaf:maker <artist/3732> .
  • 21. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> foaf:made <record/4092> . <artist/3732> <artist/3732> Text foaf:made <record/6361> . foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 22. Triple and Graph Patterns
  • 23. WHERE { ! ?album a mo:Record ; ! ! dce:date ?release_date ; ! ! dce:title ?title . ! FILTER (year(?release_date) = 2007 && month(?release_date) = 7) }
  • 25. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 26. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 27. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 29. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 30. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 31. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 32. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 33. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 34. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 36. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 37. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 38. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 39. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 40. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 41. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 42. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 43. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> <artist/3732> Text foaf:made <record/4092> . foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 45. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> foaf:made <record/4092> . <artist/3732> foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 46. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> foaf:made <record/4092> . <artist/3732> foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 47. graph pattern ?artist a mo:MusicArtist ; ! ! foaf:name ?artist_name ; ! ! foaf:homepage ?homepage .
  • 48. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> foaf:made <record/4092> . <artist/3732> foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 49. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> foaf:made <record/4092> . <artist/3732> foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 50. <artist/3908> a mo:MusicArtist . <artist/3908> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3908> foaf:homepage <http://www.petithomme.org> . <artist/3908> foaf:img <http://img.jamendo.com/artists/p/petit.homme.gif> . <artist/3908> foaf:made <record/3604> . <artist/3908> foaf:made <record/4295> . <artist/3908> foaf:name "Petit Homme"^^xsd:string . <artist/3732> a mo:MusicArtist . <artist/3732> foaf:based_near <http://sws.geonames.org/3019599/> . <artist/3732> foaf:homepage <http://blackshoulders.hautetfort.com/> . <artist/3732> foaf:img <http://img.jamendo.com/artists/w/white-shoulders.jpg> . <artist/3732> foaf:made <record/3738> . <artist/3732> foaf:made <record/4092> . <artist/3732> foaf:made <record/6361> . <artist/3732> foaf:made <record/8836> . <artist/3732> foaf:name "Whiteshoulders"^^xsd:string . <record/8836> dce:date "2007-10-09T15:58:17"^^xsd:dateTime . <record/8836> dce:title "W (EP)"^^xsd:string . <record/8836> mo:track <track/90496> . <record/8836> mo:track <track/90504> . <record/8836> mo:track <track/90508> . <record/8836> mo:track <track/90510> . <record/8836> hg:taggedWithTag tags:electro . <record/8836> hg:taggedWithTag tags:experimental . <record/8836> hg:taggedWithTag tags:noise . <record/8836> hg:taggedWithTag tags:noisy . <record/8836> a mo:Record . <record/8836> foaf:maker <artist/3732> .
  • 51. Interfaces to SPARQL endpoints • Web interfaces • Bindings for programming languages • straight HTTP • command line interfaces
  • 55. ARQ we will use the arq command line tool - see the ARQ Command Line Cheat Sheet: arq --data data/jamendo.nt --query queries/query5.rq
  • 56. Example Scenario • Get all albums for a particular month (e.g., July 2007) • List all Jamendo artists in France • explore datasets and build final query bit by bit • learn about different features of SPARQL along the way • cannot cover every aspect of SPARQL! E.g., property paths are missing.
  • 57. List all Classes SELECT DISTINCT ?class WHERE { ! ?s a ?class . } find all types of things in the dataset (classes)
  • 58. List all Classes SELECT DISTINCT ?class WHERE { ! ?s a ?class . } find all types of things in the dataset (classes) -------------------------------------------------------- | class | ======================================================== | <http://purl.org/ontology/mo/Playlist> | | <http://purl.org/ontology/mo/Signal> | | <http://purl.org/ontology/mo/Lyrics> | | <http://purl.org/ontology/mo/Track> | | <http://www.w3.org/2006/time#Interval> | | <http://purl.org/ontology/mo/Torrent> | | <http://purl.org/ontology/mo/ED2K> | | <http://purl.org/ontology/mo/Record> | | <http://www.holygoat.co.uk/owl/redwood/0.1/tags/Tag> | | <http://purl.org/ontology/mo/MusicArtist> | | <http://xmlns.com/foaf/0.1/Document> | --------------------------------------------------------
  • 59. List all Classes SELECT DISTINCT ?class WHERE { ! ?s a ?class . } find all types of things in the dataset (classes) -------------------------------------------------------- | class | ======================================================== | <http://purl.org/ontology/mo/Playlist> | | <http://purl.org/ontology/mo/Signal> | | <http://purl.org/ontology/mo/Lyrics> | | <http://purl.org/ontology/mo/Track> | | <http://www.w3.org/2006/time#Interval> | | <http://purl.org/ontology/mo/Torrent> | | <http://purl.org/ontology/mo/ED2K> | | <http://purl.org/ontology/mo/Record> | | <http://www.holygoat.co.uk/owl/redwood/0.1/tags/Tag> | | <http://purl.org/ontology/mo/MusicArtist> | | <http://xmlns.com/foaf/0.1/Document> | --------------------------------------------------------
  • 60. Properties of Artists PREFIX mo: <http://purl.org/ontology/mo/> SELECT DISTINCT ?pred WHERE { ! ?artist a mo:MusicArtist ; ! ! ?pred ?obj . } all properties for the mo:MusicArtist class
  • 61. Properties of Artists PREFIX mo: <http://purl.org/ontology/mo/> SELECT DISTINCT ?pred WHERE { ! ?artist a mo:MusicArtist ; ! ! ?pred ?obj . } all properties for the mo:MusicArtist class ----------------------------------------------------- | pred | ===================================================== | <http://xmlns.com/foaf/0.1/name> | | <http://xmlns.com/foaf/0.1/made> | | <http://xmlns.com/foaf/0.1/img> | | <http://xmlns.com/foaf/0.1/based_near> | | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | | <http://xmlns.com/foaf/0.1/homepage> | | mo:biography | -----------------------------------------------------
  • 62. Properties of Artists, ctd. PREFIX mo: <http://purl.org/ontology/mo/> SELECT DISTINCT ?class WHERE { ! ?artist a mo:MusicArtist ; ! ! ?pred ?obj . ! ?obj a ?class ; } properties with objects
  • 63. Properties of Artists, ctd. PREFIX mo: <http://purl.org/ontology/mo/> SELECT DISTINCT ?class WHERE { ! ?artist a mo:MusicArtist ; ! ! ?pred ?obj . ! ?obj a ?class ; } properties with objects ------------------------------------------------ | pred | class | ================================================ | <http://xmlns.com/foaf/0.1/made> | mo:Record | ------------------------------------------------ only one result?
  • 64. Properties of Artists, ctd. PREFIX mo: <http://purl.org/ontology/mo/> SELECT DISTINCT ?class WHERE { ! ?artist a mo:MusicArtist ; ! ! ?pred ?obj . ! OPTIONAL { ! ! ?obj a ?class . ! } OPTIONAL statement }
  • 65. Properties of Artists, ctd. PREFIX mo: <http://purl.org/ontology/mo/> SELECT DISTINCT ?class WHERE { ! ?artist a mo:MusicArtist ; ! ! ?pred ?obj . ! OPTIONAL { ! ! ?obj a ?class . ! } OPTIONAL statement } ----------------------------------------------------------------- | pred | class | ================================================================= | <http://xmlns.com/foaf/0.1/name> | | | <http://xmlns.com/foaf/0.1/made> | mo:Record | | <http://xmlns.com/foaf/0.1/img> | | | <http://xmlns.com/foaf/0.1/based_near> | | | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | | | <http://xmlns.com/foaf/0.1/homepage> | | | mo:biography | | -----------------------------------------------------------------
  • 66. Properties of Records PREFIX mo: <http://purl.org/ontology/mo/> PREFIX hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dce: <http://purl.org/dc/elements/1.1/> SELECT DISTINCT ?pred ?class WHERE { ! ?record a mo:Record ; ! ! ?pred ?obj . ! OPTIONAL { ! ! ?obj a ?class . ! } }
  • 67. Properties of Records PREFIX mo: <http://purl.org/ontology/mo/> PREFIX hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dce: <http://purl.org/dc/elements/1.1/> SELECT DISTINCT ?pred ?class WHERE { ! ?record a mo:Record ; ! ! ?pred ?obj . ! OPTIONAL { ! ! ?obj a ?class . ! } } ---------------------------------------------------------------------- | pred | class | ====================================================================== | foaf:maker | mo:MusicArtist | | mo:track | mo:Track | | hg:taggedWithTag | hg:Tag | | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | | | mo:available_as | mo:ED2K | | mo:image | | | dce:date | | | mo:available_as | mo:Torrent | | dce:title | | | mo:available_as | mo:Playlist | | dce:description | | ----------------------------------------------------------------------
  • 68. Properties of Records PREFIX mo: <http://purl.org/ontology/mo/> PREFIX hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dce: <http://purl.org/dc/elements/1.1/> SELECT DISTINCT ?pred ?class WHERE { ! ?record a mo:Record ; ! ! ?pred ?obj . ! OPTIONAL { ! ! ?obj a ?class . ! } } ---------------------------------------------------------------------- | pred | class | ====================================================================== | foaf:maker | mo:MusicArtist | | mo:track | mo:Track | | hg:taggedWithTag | hg:Tag | | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | | | mo:available_as | mo:ED2K | | mo:image | | | dce:date | | | mo:available_as | mo:Torrent | | dce:title | | | mo:available_as | mo:Playlist | | dce:description | | ----------------------------------------------------------------------
  • 69. Properties of Records, ctd. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dce: <http://purl.org/dc/elements/1.1/> SELECT DISTINCT ?pred ?class WHERE { ! ?record a mo:Record ; ! ! ?pred ?obj . ! OPTIONAL { ! ! ?obj a ?class . ! } } ORDER BY ASC(?pred) DESC(?class) ORDER BY statement
  • 70. Properties of Records, ctd. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dce: <http://purl.org/dc/elements/1.1/> SELECT DISTINCT ?pred ?class WHERE { ! ?record a mo:Record ; ! ! ?pred ?obj . ! OPTIONAL { ! ! ?obj a ?class . ! } } ORDER BY ASC(?pred) DESC(?class) ORDER BY statement ---------------------------------------------------------------------- | pred | class | ====================================================================== | dce:date | | | dce:description | | | dce:title | | | mo:available_as | mo:Torrent | | mo:available_as | mo:Playlist | | mo:available_as | mo:ED2K | | mo:image | | | mo:track | mo:Track | | hg:taggedWithTag | hg:Tag | | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | | | foaf:maker | mo:MusicArtist | ----------------------------------------------------------------------
  • 71. Properties of Records, ctd. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dce: <http://purl.org/dc/elements/1.1/> SELECT DISTINCT ?pred ?class WHERE { ! ?record a mo:Record ; ! ! ?pred ?obj . ! OPTIONAL { ! ! ?obj a ?class . ! } } ORDER BY ASC(?pred) DESC(?class) ORDER BY statement ---------------------------------------------------------------------- | pred | class | ====================================================================== | dce:date | | | dce:description | | | dce:title | | | mo:available_as | mo:Torrent | | mo:available_as | mo:Playlist | | mo:available_as | mo:ED2K | | mo:image | | | mo:track | mo:Track | | hg:taggedWithTag | hg:Tag | | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | | | foaf:maker | mo:MusicArtist | ----------------------------------------------------------------------
  • 72. Properties of Records, ctd. PREFIX mo: <http://purl.org/ontology/mo/> PREFIX hg: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dce: <http://purl.org/dc/elements/1.1/> SELECT DISTINCT ?pred ?class WHERE { ! ?record a mo:Record ; ! ! ?pred ?obj . ! OPTIONAL { ! ! ?obj a ?class . ! } } ORDER BY ASC(?pred) DESC(?class) ORDER BY statement ---------------------------------------------------------------------- | pred | class | ====================================================================== | dce:date | | | dce:description | | | dce:title | | | mo:available_as | mo:Torrent | | mo:available_as | mo:Playlist | | mo:available_as | mo:ED2K | | mo:image | | | mo:track | mo:Track | | hg:taggedWithTag | hg:Tag | | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | | | foaf:maker | mo:MusicArtist | ----------------------------------------------------------------------
  • 73. Problem: Wrong data format • date/time related functions in SPARQL expect dates in xsd:dateTime format: "2007-06-15T17:13:58"^^xsd:dateTime • however, source data has dates as plain literals with wrong format: "2007-06-15 17:13:58"
  • 74. Fixing Data PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX dce: <http://purl.org/dc/elements/1.1/> CONSTRUCT { ! ?s2 dce:date ?date_fixed . } WHERE { ! ?s2 dce:date ?date . ! BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed) }
  • 75. Fixing Data PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX dce: <http://purl.org/dc/elements/1.1/> CONSTRUCT { ! ?s2 dce:date ?date_fixed . } WHERE { ! ?s2 dce:date ?date . ! BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed) }
  • 76. Fixing Data PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX dce: <http://purl.org/dc/elements/1.1/> CONSTRUCT { ! ?s2 dce:date ?date_fixed . } WHERE { ! ?s2 dce:date ?date . ! BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed) }
  • 77. Fixing Data PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX dce: <http://purl.org/dc/elements/1.1/> CONSTRUCT { ! ?s2 dce:date ?date_fixed . } WHERE { ! ?s2 dce:date ?date . ! BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed) }
  • 78. Fixing Data PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX dce: <http://purl.org/dc/elements/1.1/> CONSTRUCT { ! ?s2 dce:date ?date_fixed . } WHERE { ! ?s2 dce:date ?date . ! BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed) }
  • 79. Fixing Data PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX dce: <http://purl.org/dc/elements/1.1/> CONSTRUCT { ! ?s2 dce:date ?date_fixed . } WHERE { ! ?s2 dce:date ?date . ! BIND (STRDT(REPLACE(?date, " ", "T"), xsd:dateTime) AS ?date_fixed) } @prefix dce: <http://purl.org/dc/elements/1.1/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://dbtune.org/jamendo/record/6015> dce:date "2007-06-15T17:13:58"^^xsd:dateTime . <http://dbtune.org/jamendo/record/6343> dce:date "2007-07-05T19:32:23"^^xsd:dateTime . <http://dbtune.org/jamendo/record/12863> dce:date "2007-11-19T11:46:34"^^xsd:dateTime . <http://dbtune.org/jamendo/record/3993> dce:date "2007-02-01T18:08:28"^^xsd:dateTime .
  • 80. Filtering Results PREFIX dce: <http://purl.org/dc/elements/1.1/> CONSTRUCT { ! ?s ?p ?o . } WHERE { ! ?s ?p ?o . ! FILTER (?p != dce:date) }
  • 81. All albums for 2007/07 PREFIX mo: <http://purl.org/ontology/mo/> PREFIX dce: <http://purl.org/dc/elements/1.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?album ?title ?release_date WHERE { ! ?album a mo:Record ; ! ! dce:date ?release_date ; ! ! dce:title ?title . ! FILTER (YEAR(?release_date) = 2007 && MONTH(?release_date) = 7) } ORDER BY ?release_date
  • 82. All albums for 2007/07 PREFIX mo: <http://purl.org/ontology/mo/> PREFIX dce: <http://purl.org/dc/elements/1.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?album ?title ?release_date WHERE { ! ?album a mo:Record ; ! ! dce:date ?release_date ; ! ! dce:title ?title . ! FILTER (YEAR(?release_date) = 2007 && MONTH(?release_date) = 7) } ORDER BY ?release_date -------------------------------------------------------------------------------------------------------------------------- | album | title | release_date | ========================================================================================================================== | <http://dbtune.org/jamendo/record/6310> | "Demo 2005"^^xsd:string | "2007-07-04T16:24:23"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6320> | "Cinema"^^xsd:string | "2007-07-04T16:39:11"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6312> | "ECLECTEK II"^^xsd:string | "2007-07-04T17:02:09"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6302> | "Unknow user"^^xsd:string | "2007-07-04T18:06:18"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6323> | "girls always cry-xysides"^^xsd:string | "2007-07-04T23:16:26"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6327> | "Fest-noz is dead"^^xsd:string | "2007-07-05T11:29:03"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6328> | "Félin Pour L'Autre"^^xsd:string | "2007-07-05T13:04:37"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6250> | "BLAPP."^^xsd:string | "2007-07-05T14:18:11"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6332> | "Cà Phê and Pizza"^^xsd:string | "2007-07-05T16:04:02"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6329> | "Life in Lento Violento"^^xsd:string | "2007-07-05T16:39:17"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6336> | "Transition"^^xsd:string | "2007-07-05T16:47:49"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6338> | "Die Zahl der Toten"^^xsd:string | "2007-07-05T19:20:52"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6343> | "Offender Girl"^^xsd:string | "2007-07-05T19:32:23"^^xsd:dateTime | | <http://dbtune.org/jamendo/record/6377> | "Donne moi"^^xsd:string | "2007-07-10T17:29:23"^^xsd:dateTime |
  • 84. Artists in France PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX mo: <http://purl.org/ontology/mo/> SELECT DISTINCT ?location WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?location . }
  • 85. Artists in France PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX mo: <http://purl.org/ontology/mo/> SELECT DISTINCT ?location WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?location . }
  • 86. Artists in France PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX mo: <http://purl.org/ontology/mo/> SELECT DISTINCT ?location WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?location . } -------------------------------------- | location | ====================================== | <http://sws.geonames.org/2661602/> | | <http://sws.geonames.org/2997861/> | | <http://sws.geonames.org/3013767/> | | <http://sws.geonames.org/3013726/> | | <http://sws.geonames.org/2802361/> | | <http://sws.geonames.org/3026644/> | | <http://sws.geonames.org/3017382/> | | <http://sws.geonames.org/3865483/> | | <http://sws.geonames.org/2968815/> | | <http://sws.geonames.org/3013657/> | | <http://sws.geonames.org/2987410/> | | <http://sws.geonames.org/2750405/> | | <http://sws.geonames.org/6424360/> | | <http://sws.geonames.org/6556330/> | | <http://sws.geonames.org/3213264/> | | <http://sws.geonames.org/2967196/> |
  • 87. Geonames SPARQL endpoints • http://api.kasabi.com/dataset/geonames/apis/ sparql • http://factforge.net/sparql
  • 88. Querying Remote Endpoint SELECT DISTINCT ?pred WHERE { ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql? apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98> ! { ! ! <http://sws.geonames.org/2661602/> ?pred ?obj . ! } }
  • 89. Querying Remote Endpoint SELECT DISTINCT ?pred WHERE { ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql? apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98> ! { ! ! <http://sws.geonames.org/2661602/> ?pred ?obj . ! } }
  • 90. Querying Remote Endpoint SELECT DISTINCT ?pred WHERE { ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql? apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98> ! { ! ! <http://sws.geonames.org/2661602/> ?pred ?obj . ! } } ------------------------------------------------------- | pred | ======================================================= | <http://www.geonames.org/ontology#alternateName> | | <http://www.geonames.org/ontology#countryCode> | | <http://www.geonames.org/ontology#featureClass> | | <http://www.geonames.org/ontology#featureCode> | | <http://www.geonames.org/ontology#locationMap> | | <http://www.geonames.org/ontology#name> | | <http://www.geonames.org/ontology#parentADM1> | | <http://www.geonames.org/ontology#parentCountry> | | <http://www.geonames.org/ontology#parentFeature> | | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | | <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> | | <http://www.w3.org/2003/01/geo/wgs84_pos#lat> | | <http://www.w3.org/2003/01/geo/wgs84_pos#long> | | <http://www.geonames.org/ontology#childrenFeatures> | -------------------------------------------------------
  • 91. Querying Remote Endpoint SELECT DISTINCT ?pred WHERE { ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql? apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98> ! { ! ! <http://sws.geonames.org/2661602/> ?pred ?obj . ! } } ------------------------------------------------------- | pred | ======================================================= | <http://www.geonames.org/ontology#alternateName> | | <http://www.geonames.org/ontology#countryCode> | | <http://www.geonames.org/ontology#featureClass> | | <http://www.geonames.org/ontology#featureCode> | | <http://www.geonames.org/ontology#locationMap> | | <http://www.geonames.org/ontology#name> | | <http://www.geonames.org/ontology#parentADM1> | | <http://www.geonames.org/ontology#parentCountry> | | <http://www.geonames.org/ontology#parentFeature> | | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | | <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> | | <http://www.w3.org/2003/01/geo/wgs84_pos#lat> | | <http://www.w3.org/2003/01/geo/wgs84_pos#long> | | <http://www.geonames.org/ontology#childrenFeatures> | -------------------------------------------------------
  • 92. Querying Remote Endpoint SELECT DISTINCT ?pred WHERE { ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql? apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98> ! { ! ! <http://sws.geonames.org/2661602/> ?pred ?obj . ! } } ------------------------------------------------------- | pred | ======================================================= | <http://www.geonames.org/ontology#alternateName> | | <http://www.geonames.org/ontology#countryCode> | | <http://www.geonames.org/ontology#featureClass> | | <http://www.geonames.org/ontology#featureCode> | | <http://www.geonames.org/ontology#locationMap> | | <http://www.geonames.org/ontology#name> | | <http://www.geonames.org/ontology#parentADM1> | | <http://www.geonames.org/ontology#parentCountry> | | <http://www.geonames.org/ontology#parentFeature> | | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | | <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> | | <http://www.w3.org/2003/01/geo/wgs84_pos#lat> | | <http://www.w3.org/2003/01/geo/wgs84_pos#long> | | <http://www.geonames.org/ontology#childrenFeatures> | -------------------------------------------------------
  • 93. Combining Local + Remote PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist ?name WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?location . ! ! ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql? apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98> ! { ! ! ?location geonames:name ?name . ! } ! ! } LIMIT 50
  • 94. Combining Local + Remote PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist ?name WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?location . ! ! ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql? apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98> ! { ! ! ?location geonames:name ?name . ! } ! ! } LIMIT 50 ------------------------------------------------------------------------------------- | artist | name | ===================================================================================== | <http://dbtune.org/jamendo/artist/5496> | "Kanton Basel-Stadt" | | <http://dbtune.org/jamendo/artist/256> | "Département de la Loire-Atlantique" | | <http://dbtune.org/jamendo/artist/337049> | "Département de la Haute-Garonne" | | <http://dbtune.org/jamendo/artist/8035> | "Département des Hautes-Pyrénées" | | <http://dbtune.org/jamendo/artist/6260> | "Kingdom of Belgium" | | <http://dbtune.org/jamendo/artist/2471> | "Département de la Charente-Maritime" | | <http://dbtune.org/jamendo/artist/3572> | "Republic of France" | | <http://dbtune.org/jamendo/artist/4680> | "Argentine Republic" |
  • 95. What is France? PREFIX geonames: <http://www.geonames.org/ontology#> SELECT DISTINCT ?country ?name WHERE { ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql? apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98> ! { ! ! SELECT DISTINCT ?country ?name ! ! WHERE { ! ! ! ?country geonames:featureCode geonames:A.PCLI ; ! ! ! ! geonames:name ?name . ! ! ! FILTER (regex(?name, "france", "i")) ! ! } ! } } ORDER BY ?name
  • 96. What is France? PREFIX geonames: <http://www.geonames.org/ontology#> SELECT DISTINCT ?country ?name WHERE { ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql? apikey=07d5e23c8d7bf5ae576f39c64e822ea6baffea98> ! { ! ! SELECT DISTINCT ?country ?name ! ! WHERE { ! ! ! ?country geonames:featureCode geonames:A.PCLI ; ! ! ! ! geonames:name ?name . ! ! ! FILTER (regex(?name, "france", "i")) ! ! } ! } } ORDER BY ?name ------------------------------------------------------------- | country | name | ============================================================= | <http://sws.geonames.org/3017382/> | "Republic of France" | -------------------------------------------------------------
  • 97. Artists in France (1) PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist ?name WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near <http://sws.geonames.org/3017382/> ; ! ! foaf:name ?name . ! ! } ORDER BY ?name
  • 98. Artists in France (1) PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist ?name WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near <http://sws.geonames.org/3017382/> ; ! ! foaf:name ?name . ! ! } ORDER BY ?name ------------------------------------------------------------------------------------------------------------------- | artist | name | =================================================================================================================== | <http://dbtune.org/jamendo/artist/3972> | "#2 Orchestra"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/5865> | "(own+line)"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/4779> | "7BZH"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/3297> | "AMarie.C"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/754> | "Adam Lwo"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/4825> | "Alteranti"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/784> | "Ataraxia Rebel Force"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/289> | "Auto/Sexual"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/565> | "BUREAU DES FLUIDES"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/336803> | "Baron Baroff"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/8316> | "Bertrand Homassel"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/274> | "Bleacher"^^<http://www.w3.org/2001/XMLSchema#string> | | <http://dbtune.org/jamendo/artist/3835> | "Brigade Neurale"^^<http://www.w3.org/2001/XMLSchema#string> |
  • 99. Artists in France (2) PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist ?name ?place ?place_name WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?place ; ! ! foaf:name ?name . ! ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?apikey=APIKEY> ! { ! ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! ! geonames:name ?place_name . ! } ! ! } ORDER BY ?name LIMIT 10
  • 100. Artists in France (2) PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist ?name ?place ?place_name WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?place ; ! ! foaf:name ?name . ! ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?apikey=APIKEY> ! { ! ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! ! geonames:name ?place_name . ! } ! ! } ORDER BY ?name LIMIT 10
  • 101. Places in France PREFIX geonames: ! <http://www.geonames.org/ontology#> CONSTRUCT { ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! geonames:name ?name . } WHERE { ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?apikey=APIKEY> ! { ! ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! ! geonames:name ?name . ! }! ! }
  • 102. Places in France PREFIX geonames: ! <http://www.geonames.org/ontology#> CONSTRUCT { ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! geonames:name ?name . } WHERE { ! SERVICE <http://api.kasabi.com/dataset/geonames/apis/sparql?apikey=APIKEY> ! { ! ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! ! geonames:name ?name . ! }! ! } @prefix geonames: <http://www.geonames.org/ontology#> . <http://sws.geonames.org/3003977/> geonames:name "Le Grand Merimont" ; geonames:parentCountry <http://sws.geonames.org/3017382/> . <http://sws.geonames.org/2994812/> geonames:name "Mean-Ruz" ; geonames:parentCountry <http://sws.geonames.org/3017382/> . <http://sws.geonames.org/7535264/> geonames:name "Golf du Prieuré" ; geonames:parentCountry <http://sws.geonames.org/3017382/> .
  • 103. Et voilà - Les artistes de France! PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist_name ?place_name FROM <../data/jamendo-rdf/jamendo.nt> FROM <../data/in_france.nt> WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?place ; ! ! foaf:name ?artist_name . ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! geonames:name ?place_name . } ORDER BY ?artist_name
  • 104. Et voilà - Les artistes de France! PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist_name ?place_name FROM <../data/jamendo-rdf/jamendo.nt> FROM <../data/in_france.nt> WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?place ; ! ! foaf:name ?artist_name . ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! geonames:name ?place_name . } ORDER BY ?artist_name ---------------------------------------------------------------------------------------------------------------- | artist_name | place_name | ================================================================================================================ | "#2 Orchestra"^^<http://www.w3.org/2001/XMLSchema#string> | "Republic of France" | | "#Blockout"^^<http://www.w3.org/2001/XMLSchema#string> | "Département des Yvelines" | | "#Dance 75#"^^<http://www.w3.org/2001/XMLSchema#string> | "Paris" | | "#NarNaoud#"^^<http://www.w3.org/2001/XMLSchema#string> | "Département de la Gironde" | | "#ZedMeta#"^^<http://www.w3.org/2001/XMLSchema#string> | "Paris" | | "#Zorglups#"^^<http://www.w3.org/2001/XMLSchema#string> | "Département de l'Essonne" | | "&ND"^^<http://www.w3.org/2001/XMLSchema#string> | "Paris" | | "(own+line)"^^<http://www.w3.org/2001/XMLSchema#string> | "Republic of France" | | "* Q u i r y *"^^<http://www.w3.org/2001/XMLSchema#string> | "Paris" | | "-=Kwada=-"^^<http://www.w3.org/2001/XMLSchema#string> | "Département de la Haute-Garonne" | | "-DEMO-"^^<http://www.w3.org/2001/XMLSchema#string> | "Département du Nord" |
  • 105. Et voilà - Les artistes de France! PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist_name ?place_name FROM <../data/jamendo-rdf/jamendo.nt> FROM <../data/in_france.nt> WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?place ; ! ! foaf:name ?artist_name . ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! geonames:name ?place_name . } ORDER BY ?artist_name ---------------------------------------------------------------------------------------------------------------- | artist_name | place_name | ================================================================================================================ | "#2 Orchestra"^^<http://www.w3.org/2001/XMLSchema#string> | "Republic of France" | | "#Blockout"^^<http://www.w3.org/2001/XMLSchema#string> | "Département des Yvelines" | | "#Dance 75#"^^<http://www.w3.org/2001/XMLSchema#string> | "Paris" | | "#NarNaoud#"^^<http://www.w3.org/2001/XMLSchema#string> | "Département de la Gironde" | | "#ZedMeta#"^^<http://www.w3.org/2001/XMLSchema#string> | "Paris" | | "#Zorglups#"^^<http://www.w3.org/2001/XMLSchema#string> | "Département de l'Essonne" | | "&ND"^^<http://www.w3.org/2001/XMLSchema#string> | "Paris" | | "(own+line)"^^<http://www.w3.org/2001/XMLSchema#string> | "Republic of France" | | "* Q u i r y *"^^<http://www.w3.org/2001/XMLSchema#string> | "Paris" | | "-=Kwada=-"^^<http://www.w3.org/2001/XMLSchema#string> | "Département de la Haute-Garonne" | | "-DEMO-"^^<http://www.w3.org/2001/XMLSchema#string> | "Département du Nord" |
  • 106. One more thing... PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist_name ?place_name FROM <../data/jamendo-rdf/jamendo.nt> FROM NAMED <../data/in_france.nt> WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?place ; ! ! foaf:name ?artist_name . ! GRAPH <../data/in_france.nt> { ! ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! ! geonames:name ?place_name . ! } } ORDER BY ?artist_name
  • 107. One more thing... PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist_name ?place_name FROM <../data/jamendo-rdf/jamendo.nt> FROM NAMED <../data/in_france.nt> WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?place ; ! ! foaf:name ?artist_name . ! GRAPH <../data/in_france.nt> { ! ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! ! geonames:name ?place_name . ! } } ORDER BY ?artist_name
  • 108. One more thing... PREFIX foaf: ! ! <http://xmlns.com/foaf/0.1/> PREFIX geonames: ! <http://www.geonames.org/ontology#> PREFIX mo: ! ! <http://purl.org/ontology/mo/> SELECT DISTINCT ?artist_name ?place_name FROM <../data/jamendo-rdf/jamendo.nt> FROM NAMED <../data/in_france.nt> WHERE { ! ?artist a mo:MusicArtist ; ! ! foaf:based_near ?place ; ! ! foaf:name ?artist_name . ! GRAPH <../data/in_france.nt> { ! ! ?place geonames:parentCountry <http://sws.geonames.org/3017382/> ; ! ! ! geonames:name ?place_name . ! } } ORDER BY ?artist_name
  • 109.
  • 110.
  • 111. One last thing... PREFIX swrc: <http://swrc.ontoware.org/ontology#> PREFIX org: <http://data.semanticweb.org/organization/> SELECT ?affiliation ?conference_graph WHERE { ! SERVICE <http://data.semanticweb.org/sparql> { ! ! GRAPH ?conference_graph { ! ! ! <http://data.semanticweb.org/person/richard-cyganiak> swrc:affiliation ?affiliation . ! ! } ! } }
  • 112. One last thing... PREFIX swrc: <http://swrc.ontoware.org/ontology#> PREFIX org: <http://data.semanticweb.org/organization/> SELECT ?affiliation ?conference_graph WHERE { ! SERVICE <http://data.semanticweb.org/sparql> { ! ! GRAPH ?conference_graph { ! ! ! <http://data.semanticweb.org/person/richard-cyganiak> swrc:affiliation ?affiliation . ! ! } ! } }

Hinweis der Redaktion

  1. \n
  2. - &amp;#x201C;SQL for the Semantic Web&amp;#x201D; - not sure who actually said that first, but it&amp;#x2019;s being repeated a lot\n- people who know a lot about SQL often say that SPARQL is actually not like SQL at all, but at least it looks a bit similar and uses similar keywords\n- \n
  3. - just some quick historical fun facts about SPARQL\n- work started some time in 2004, and in 2008 SPARQL 1.0 was released as a W3C recommendation\n- SPARQL 1.0 has all the basics, and most or a lot of what you&amp;#x2019;ll do is probably going to be covered by it\n- SPARQL 1.1 adds a fair amount of new functionality, and lot of neat syntactical features\n- we are going to include quite a few things from SPARQL 1.1\n- however, there are some (very interesting!) parts of SPARQL 1.1 that we won&amp;#x2019;t cover in this tutorial, such as updates or deletes\n
  4. - throughout this tutorial, we&amp;#x2019;re going to talk about and use what is called &amp;#x201C;SPARQL endpoints&amp;#x201D;\n- so, very briefly, here is what it is:\n- in a nutshell, if we have some RDF, e.g., in a triple store or in any other data source that can provide RDF, then we can add a piece of software called a &amp;#x201C;SPARQL endpoint&amp;#x201D; or a &amp;#x201C;SPARQL processor&amp;#x201D;\n- this endpoint acts as a query interface to the RDF data, in the sense that we can pass a query to it, and it will give a result back\n
  5. - ok, just to give you a taste, I thought I&amp;#x2019;d jump right in and show you what a medium complex query could look like\n- I&amp;#x2019;m not going to go into detail now, but you can see that the query selects some things like artists and titles (probably of records)\n- there are variables (indicated by the question marks)\n- there are bits of the query that, if you know Turtle or N3 syntax, look like triples\n- there is a FILTER with functions in it\n- there is a command that seems to sort or order the query results\n- ok, at this point, lets just see what happens when I run this query on some data (run query &amp;#x201C;17_albums_2007.rq&amp;#x201D; in arq on Jamendo data)\n
  6. - in this part of the tutorial, I&amp;#x2019;m going to explain in some detail how you use SPARQL, but here is how it works in a nutshell\n- usually, a SPARQL query consists of (at least) two parts: \n- a first part, which I&amp;#x2019;ll just call a &amp;#x201C;query clause&amp;#x201D;, and a second part, which is called the &amp;#x201C;WHERE clause&amp;#x201D;\n- in the query clause, you say what you want to get, and in what form. There are four different types of queries which you can use (oral examples). \n- this part of the query is usually quite simple (except for a CONSTRUCT clause, which can be as complex as you like)\n- the WHERE clause is where the magic happens - here, you define the filter or the pattern that very precisely lets you pick out parts of the RDF graph\n- you use what is called triple patterns and graph patterns to define this - I&amp;#x2019;m going to talk about this in a minute\n- there can also be some other parts to a SPARQL query, like a prologue and solution modifiers, and we&amp;#x2019;ll get to those as well\n
  7. - in this part of the tutorial, I&amp;#x2019;m going to explain in some detail how you use SPARQL, but here is how it works in a nutshell\n- usually, a SPARQL query consists of (at least) two parts: \n- a first part, which I&amp;#x2019;ll just call a &amp;#x201C;query clause&amp;#x201D;, and a second part, which is called the &amp;#x201C;WHERE clause&amp;#x201D;\n- in the query clause, you say what you want to get, and in what form. There are four different types of queries which you can use (oral examples). \n- this part of the query is usually quite simple (except for a CONSTRUCT clause, which can be as complex as you like)\n- the WHERE clause is where the magic happens - here, you define the filter or the pattern that very precisely lets you pick out parts of the RDF graph\n- you use what is called triple patterns and graph patterns to define this - I&amp;#x2019;m going to talk about this in a minute\n- there can also be some other parts to a SPARQL query, like a prologue and solution modifiers, and we&amp;#x2019;ll get to those as well\n
  8. - in this part of the tutorial, I&amp;#x2019;m going to explain in some detail how you use SPARQL, but here is how it works in a nutshell\n- usually, a SPARQL query consists of (at least) two parts: \n- a first part, which I&amp;#x2019;ll just call a &amp;#x201C;query clause&amp;#x201D;, and a second part, which is called the &amp;#x201C;WHERE clause&amp;#x201D;\n- in the query clause, you say what you want to get, and in what form. There are four different types of queries which you can use (oral examples). \n- this part of the query is usually quite simple (except for a CONSTRUCT clause, which can be as complex as you like)\n- the WHERE clause is where the magic happens - here, you define the filter or the pattern that very precisely lets you pick out parts of the RDF graph\n- you use what is called triple patterns and graph patterns to define this - I&amp;#x2019;m going to talk about this in a minute\n- there can also be some other parts to a SPARQL query, like a prologue and solution modifiers, and we&amp;#x2019;ll get to those as well\n
  9. - in this part of the tutorial, I&amp;#x2019;m going to explain in some detail how you use SPARQL, but here is how it works in a nutshell\n- usually, a SPARQL query consists of (at least) two parts: \n- a first part, which I&amp;#x2019;ll just call a &amp;#x201C;query clause&amp;#x201D;, and a second part, which is called the &amp;#x201C;WHERE clause&amp;#x201D;\n- in the query clause, you say what you want to get, and in what form. There are four different types of queries which you can use (oral examples). \n- this part of the query is usually quite simple (except for a CONSTRUCT clause, which can be as complex as you like)\n- the WHERE clause is where the magic happens - here, you define the filter or the pattern that very precisely lets you pick out parts of the RDF graph\n- you use what is called triple patterns and graph patterns to define this - I&amp;#x2019;m going to talk about this in a minute\n- there can also be some other parts to a SPARQL query, like a prologue and solution modifiers, and we&amp;#x2019;ll get to those as well\n
  10. - ok, just to give you a taste, I thought I&amp;#x2019;d jump right in and show you what a medium complex query could look like\n- I&amp;#x2019;m not going to go into detail now, but you can see that the query selects some things like artists and titles (probably of records)\n- there are variables (indicated by the question marks)\n- there are bits of the query that, if you know Turtle or N3 syntax, look like triples\n- there is a FILTER with functions in it\n- there is a command that seems to sort or order the query results\n
  11. - ok, just to give you a taste, I thought I&amp;#x2019;d jump right in and show you what a medium complex query could look like\n- I&amp;#x2019;m not going to go into detail now, but you can see that the query selects some things like artists and titles (probably of records)\n- there are variables (indicated by the question marks)\n- there are bits of the query that, if you know Turtle or N3 syntax, look like triples\n- there is a FILTER with functions in it\n- there is a command that seems to sort or order the query results\n
  12. - ok, just to give you a taste, I thought I&amp;#x2019;d jump right in and show you what a medium complex query could look like\n- I&amp;#x2019;m not going to go into detail now, but you can see that the query selects some things like artists and titles (probably of records)\n- there are variables (indicated by the question marks)\n- there are bits of the query that, if you know Turtle or N3 syntax, look like triples\n- there is a FILTER with functions in it\n- there is a command that seems to sort or order the query results\n
  13. - ok, just to give you a taste, I thought I&amp;#x2019;d jump right in and show you what a medium complex query could look like\n- I&amp;#x2019;m not going to go into detail now, but you can see that the query selects some things like artists and titles (probably of records)\n- there are variables (indicated by the question marks)\n- there are bits of the query that, if you know Turtle or N3 syntax, look like triples\n- there is a FILTER with functions in it\n- there is a command that seems to sort or order the query results\n
  14. - ok, just to give you a taste, I thought I&amp;#x2019;d jump right in and show you what a medium complex query could look like\n- I&amp;#x2019;m not going to go into detail now, but you can see that the query selects some things like artists and titles (probably of records)\n- there are variables (indicated by the question marks)\n- there are bits of the query that, if you know Turtle or N3 syntax, look like triples\n- there is a FILTER with functions in it\n- there is a command that seems to sort or order the query results\n
  15. \n
  16. \n
  17. - this is some Jamendo example data as a visual graph, with circles and boxes and arrows\n
  18. - thats&amp;#x2019;s the same data in Turtle syntax\n- we&amp;#x2019;re getting closer to SPARQL already - SPARQL is using an almost identical syntax to Turtle\n
  19. - and here is the same data again, only this time it&amp;#x2019;s shown one triple at a time\n- (i.e., in ntriples syntax)\n- you&amp;#x2019;ll see in a minute why I am showing it this way\n
  20. - SPARQL is a lot of things and has a lot of features\n- but a lot of it comes down to triple and graph patterns\n- because that is how you pick and select parts of an RDF graph to answer your query\n\n
  21. - these patterns are what you put in your WHERE clause, which the SPARQL engine then tries to match against your RDF data\n- so, the bit in bold here is a graph pattern\n- in the next few slides, I&amp;#x2019;m going to show you in more detail how these patterns work\n
  22. - so, what are triple patterns?\n- in the easiest case, it&amp;#x2019;s just a triple, like this one here\n- triple pattern with no variables\n
  23. - since there are no variables, this pattern can match at most one triple in our data\n- (if that triple is in there)\n
  24. \n
  25. - triple pattern with one variable\n
  26. \n
  27. \n
  28. \n
  29. \n
  30. - each of these triples is one result binding\n
  31. - triple pattern with two variables\n- by the way - I should say that the names of these variables don&amp;#x2019;t matter. You could call them anything you like.\n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. - triple pattern with two variables\n- by the way - I should say that the names of these variables don&amp;#x2019;t matter. You could call them anything you like.\n
  40. \n
  41. - obviously, with three variables, every triple matches, so you get everything back\n
  42. - triple pattern with two variables\n- by the way - I should say that the names of these variables don&amp;#x2019;t matter. You could call them anything you like.\n
  43. \n
  44. \n
  45. \n
  46. - before I now go through a complete scenario with the Jamendo data and some Geonames data, I&amp;#x2019;ll quickly look at the practical question of &amp;#x201C;how does one actually interact with a SPARQL endpoint&amp;#x201D;\n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. - something that is very useful to do once you start working with a new dataset is to get an overview of what is in there\n- you can do that with a couple of very simple SPARQL SELECT queries\n- for example, we could very easily ask for all types of things (i.e., classes) in our dataset\n- we just use a triple pattern with the &amp;#x201C;a&amp;#x201D; abbreviation for &amp;#x201C;rdf:type&amp;#x201D; in the WHERE clause, and SELECT the binding for the ?class variable\n- note that we are adding the DISTINCT keyword to the SELECT clause, to prevent duplicates (there could very well be duplicates, as there could be many triples matching the pattern with the same binding for ?class)\n- we get a list of classes back. Let&amp;#x2019;s look closer at the MusicArtist class \n
  53. - something that is very useful to do once you start working with a new dataset is to get an overview of what is in there\n- you can do that with a couple of very simple SPARQL SELECT queries\n- for example, we could very easily ask for all types of things (i.e., classes) in our dataset\n- we just use a triple pattern with the &amp;#x201C;a&amp;#x201D; abbreviation for &amp;#x201C;rdf:type&amp;#x201D; in the WHERE clause, and SELECT the binding for the ?class variable\n- note that we are adding the DISTINCT keyword to the SELECT clause, to prevent duplicates (there could very well be duplicates, as there could be many triples matching the pattern with the same binding for ?class)\n- we get a list of classes back. Let&amp;#x2019;s look closer at the MusicArtist class \n
  54. - since we&amp;#x2019;re interested in artists, it helps to know which properties are used for artists in the dataset\n- we can find out about that in a similar way, by using a simple SELECT query\n- we&amp;#x2019;re also defining a prefix definition at the top (in the &amp;#x201C;prologue&amp;#x201D;), so that we can abbreviate the URI of MusicArtist\n- now, it would be even more interesting if we could know what types of things these predicates link to ...\n
  55. - here we&amp;#x2019;re adding a third triple pattern to our graph pattern - the type of whatever is bound to the ?obj variable\n- looking at the result here, we can see that the foaf:made property links to things of type mo:Record. That&amp;#x2019;s good, because remember we want to find all albums for a particular month.\n- however, note that we only get one result!\n- why is that? - there are no type definitions for the objects of most of the artist properties in the dataset\n- since the SPARQL processor is trying to match the whole graph pattern, triples with those properties don&amp;#x2019;t match\n
  56. - we can use the OPTIONAL keyword to add parts to the pattern that don&amp;#x2019;t have to match - they are, as the name implies, optional\n- if the optional pattern matches, the matching triples are added to the result\n- if not, we still get a result\n\n
  57. - we can do one more exploration step, just like before, only this time we&amp;#x2019;re looking for properties of records instead of artists\n- you&amp;#x2019;ll notice two things: \n- I have added some more prefix definitions in the prologue - we don&amp;#x2019;t actually need them in the query, but the arq tool picks them up for the results as well, which makes them a look a little less cluttered and more readable\n- also, you&amp;#x2019;ll notice that the mo:available_as property actually links to objects of three different types, which is why it shows up three times in the results table\n- however, because the results are not ordered in any way, this is a bit hard to see at first\n\n
  58. - we can do one more exploration step, just like before, only this time we&amp;#x2019;re looking for properties of records instead of artists\n- you&amp;#x2019;ll notice two things: \n- I have added some more prefix definitions in the prologue - we don&amp;#x2019;t actually need them in the query, but the arq tool picks them up for the results as well, which makes them a look a little less cluttered and more readable\n- also, you&amp;#x2019;ll notice that the mo:available_as property actually links to objects of three different types, which is why it shows up three times in the results table\n- however, because the results are not ordered in any way, this is a bit hard to see at first\n\n
  59. - we can use the ORDER BY keyword in the results modifier part after the WHERE clause to order the results based on one (or more) variables\n- so, in this case, we are ordering the results alphabetically in ascending order by the ?pred variable (the URI, not the prefix!), and then by the ?class variable (in descending order)\n- ascending order is default, so you don&amp;#x2019;t actually have to specify that\n- now, remember we want to find records from a particular month. We can see here that records have a dc:date property, so we can hopefully use that to get what we want.\n
  60. - we can use the ORDER BY keyword in the results modifier part after the WHERE clause to order the results based on one (or more) variables\n- so, in this case, we are ordering the results alphabetically in ascending order by the ?pred variable (the URI, not the prefix!), and then by the ?class variable (in descending order)\n- ascending order is default, so you don&amp;#x2019;t actually have to specify that\n- now, remember we want to find records from a particular month. We can see here that records have a dc:date property, so we can hopefully use that to get what we want.\n
  61. - we can use the ORDER BY keyword in the results modifier part after the WHERE clause to order the results based on one (or more) variables\n- so, in this case, we are ordering the results alphabetically in ascending order by the ?pred variable (the URI, not the prefix!), and then by the ?class variable (in descending order)\n- ascending order is default, so you don&amp;#x2019;t actually have to specify that\n- now, remember we want to find records from a particular month. We can see here that records have a dc:date property, so we can hopefully use that to get what we want.\n
  62. - we can use the ORDER BY keyword in the results modifier part after the WHERE clause to order the results based on one (or more) variables\n- so, in this case, we are ordering the results alphabetically in ascending order by the ?pred variable (the URI, not the prefix!), and then by the ?class variable (in descending order)\n- ascending order is default, so you don&amp;#x2019;t actually have to specify that\n- now, remember we want to find records from a particular month. We can see here that records have a dc:date property, so we can hopefully use that to get what we want.\n
  63. - SPARQL 1.1 offers some nice functions to deal with dates, but they only work with properly formatted xsd:dateTime literals\n- unfortunately, however, in the source date we have plain literals with a slightly wrong format\n- what can we do? It would be great if we could create the correct RDF data from the existing, slightly wrong data\n- luckily, SPARQL has another query form which lets us create RDF graphs!\n
  64. - in a CONSTRUCT clause, you build triple and graph patterns in the same way as you do in the WHERE clause\n- instead of a list of variable bindings - like for SELECT - you now get an RDF graph as the result of the query, with the variables bound to the values in the matching parts of the source graph\n- in this query, there are several things going on:\n- first of all, I use REPLACE to do a simple string search and replace in the original ?date value - I replace spaces with a &amp;#x201C;T&amp;#x201D;. REPLACE is one of the many functions that SPARQL offers to test or manipulate values\n- another one is STRDT, which I use to assign the datatype xsd:dateTime to the new value\n- to make sure I can use this new value in my CONSTRUCT clause, I&amp;#x2019;m using the BIND AS keyword. In general, you use BIND AS to create some new or derived values that were not part of the source data. Here, I&amp;#x2019;m introducing the new variable ?date_fixed, which I want to bind to the date in the correct format. This new variable will be added to the result.\n- finally, in the CONSTRUCT clause, I define the triple pattern for the output. What happens is that for every matching pattern from the WHERE clause, I will create this new pattern. The only thing that is different between the two is actually the object, where I use the ?data_fixed variable\n- you can, however, create any RDF you want in a CONSTRUCT\n- ok, the final output of this query is an RDF graph like this\n\n
  65. - in a CONSTRUCT clause, you build triple and graph patterns in the same way as you do in the WHERE clause\n- instead of a list of variable bindings - like for SELECT - you now get an RDF graph as the result of the query, with the variables bound to the values in the matching parts of the source graph\n- in this query, there are several things going on:\n- first of all, I use REPLACE to do a simple string search and replace in the original ?date value - I replace spaces with a &amp;#x201C;T&amp;#x201D;. REPLACE is one of the many functions that SPARQL offers to test or manipulate values\n- another one is STRDT, which I use to assign the datatype xsd:dateTime to the new value\n- to make sure I can use this new value in my CONSTRUCT clause, I&amp;#x2019;m using the BIND AS keyword. In general, you use BIND AS to create some new or derived values that were not part of the source data. Here, I&amp;#x2019;m introducing the new variable ?date_fixed, which I want to bind to the date in the correct format. This new variable will be added to the result.\n- finally, in the CONSTRUCT clause, I define the triple pattern for the output. What happens is that for every matching pattern from the WHERE clause, I will create this new pattern. The only thing that is different between the two is actually the object, where I use the ?data_fixed variable\n- you can, however, create any RDF you want in a CONSTRUCT\n- ok, the final output of this query is an RDF graph like this\n\n
  66. - in a CONSTRUCT clause, you build triple and graph patterns in the same way as you do in the WHERE clause\n- instead of a list of variable bindings - like for SELECT - you now get an RDF graph as the result of the query, with the variables bound to the values in the matching parts of the source graph\n- in this query, there are several things going on:\n- first of all, I use REPLACE to do a simple string search and replace in the original ?date value - I replace spaces with a &amp;#x201C;T&amp;#x201D;. REPLACE is one of the many functions that SPARQL offers to test or manipulate values\n- another one is STRDT, which I use to assign the datatype xsd:dateTime to the new value\n- to make sure I can use this new value in my CONSTRUCT clause, I&amp;#x2019;m using the BIND AS keyword. In general, you use BIND AS to create some new or derived values that were not part of the source data. Here, I&amp;#x2019;m introducing the new variable ?date_fixed, which I want to bind to the date in the correct format. This new variable will be added to the result.\n- finally, in the CONSTRUCT clause, I define the triple pattern for the output. What happens is that for every matching pattern from the WHERE clause, I will create this new pattern. The only thing that is different between the two is actually the object, where I use the ?data_fixed variable\n- you can, however, create any RDF you want in a CONSTRUCT\n- ok, the final output of this query is an RDF graph like this\n\n
  67. - in a CONSTRUCT clause, you build triple and graph patterns in the same way as you do in the WHERE clause\n- instead of a list of variable bindings - like for SELECT - you now get an RDF graph as the result of the query, with the variables bound to the values in the matching parts of the source graph\n- in this query, there are several things going on:\n- first of all, I use REPLACE to do a simple string search and replace in the original ?date value - I replace spaces with a &amp;#x201C;T&amp;#x201D;. REPLACE is one of the many functions that SPARQL offers to test or manipulate values\n- another one is STRDT, which I use to assign the datatype xsd:dateTime to the new value\n- to make sure I can use this new value in my CONSTRUCT clause, I&amp;#x2019;m using the BIND AS keyword. In general, you use BIND AS to create some new or derived values that were not part of the source data. Here, I&amp;#x2019;m introducing the new variable ?date_fixed, which I want to bind to the date in the correct format. This new variable will be added to the result.\n- finally, in the CONSTRUCT clause, I define the triple pattern for the output. What happens is that for every matching pattern from the WHERE clause, I will create this new pattern. The only thing that is different between the two is actually the object, where I use the ?data_fixed variable\n- you can, however, create any RDF you want in a CONSTRUCT\n- ok, the final output of this query is an RDF graph like this\n\n
  68. - in a CONSTRUCT clause, you build triple and graph patterns in the same way as you do in the WHERE clause\n- instead of a list of variable bindings - like for SELECT - you now get an RDF graph as the result of the query, with the variables bound to the values in the matching parts of the source graph\n- in this query, there are several things going on:\n- first of all, I use REPLACE to do a simple string search and replace in the original ?date value - I replace spaces with a &amp;#x201C;T&amp;#x201D;. REPLACE is one of the many functions that SPARQL offers to test or manipulate values\n- another one is STRDT, which I use to assign the datatype xsd:dateTime to the new value\n- to make sure I can use this new value in my CONSTRUCT clause, I&amp;#x2019;m using the BIND AS keyword. In general, you use BIND AS to create some new or derived values that were not part of the source data. Here, I&amp;#x2019;m introducing the new variable ?date_fixed, which I want to bind to the date in the correct format. This new variable will be added to the result.\n- finally, in the CONSTRUCT clause, I define the triple pattern for the output. What happens is that for every matching pattern from the WHERE clause, I will create this new pattern. The only thing that is different between the two is actually the object, where I use the ?data_fixed variable\n- you can, however, create any RDF you want in a CONSTRUCT\n- ok, the final output of this query is an RDF graph like this\n\n
  69. - in a CONSTRUCT clause, you build triple and graph patterns in the same way as you do in the WHERE clause\n- instead of a list of variable bindings - like for SELECT - you now get an RDF graph as the result of the query, with the variables bound to the values in the matching parts of the source graph\n- in this query, there are several things going on:\n- first of all, I use REPLACE to do a simple string search and replace in the original ?date value - I replace spaces with a &amp;#x201C;T&amp;#x201D;. REPLACE is one of the many functions that SPARQL offers to test or manipulate values\n- another one is STRDT, which I use to assign the datatype xsd:dateTime to the new value\n- to make sure I can use this new value in my CONSTRUCT clause, I&amp;#x2019;m using the BIND AS keyword. In general, you use BIND AS to create some new or derived values that were not part of the source data. Here, I&amp;#x2019;m introducing the new variable ?date_fixed, which I want to bind to the date in the correct format. This new variable will be added to the result.\n- finally, in the CONSTRUCT clause, I define the triple pattern for the output. What happens is that for every matching pattern from the WHERE clause, I will create this new pattern. The only thing that is different between the two is actually the object, where I use the ?data_fixed variable\n- you can, however, create any RDF you want in a CONSTRUCT\n- ok, the final output of this query is an RDF graph like this\n\n
  70. - in a CONSTRUCT clause, you build triple and graph patterns in the same way as you do in the WHERE clause\n- instead of a list of variable bindings - like for SELECT - you now get an RDF graph as the result of the query, with the variables bound to the values in the matching parts of the source graph\n- in this query, there are several things going on:\n- first of all, I use REPLACE to do a simple string search and replace in the original ?date value - I replace spaces with a &amp;#x201C;T&amp;#x201D;. REPLACE is one of the many functions that SPARQL offers to test or manipulate values\n- another one is STRDT, which I use to assign the datatype xsd:dateTime to the new value\n- to make sure I can use this new value in my CONSTRUCT clause, I&amp;#x2019;m using the BIND AS keyword. In general, you use BIND AS to create some new or derived values that were not part of the source data. Here, I&amp;#x2019;m introducing the new variable ?date_fixed, which I want to bind to the date in the correct format. This new variable will be added to the result.\n- finally, in the CONSTRUCT clause, I define the triple pattern for the output. What happens is that for every matching pattern from the WHERE clause, I will create this new pattern. The only thing that is different between the two is actually the object, where I use the ?data_fixed variable\n- you can, however, create any RDF you want in a CONSTRUCT\n- ok, the final output of this query is an RDF graph like this\n\n
  71. - in a CONSTRUCT clause, you build triple and graph patterns in the same way as you do in the WHERE clause\n- instead of a list of variable bindings - like for SELECT - you now get an RDF graph as the result of the query, with the variables bound to the values in the matching parts of the source graph\n- in this query, there are several things going on:\n- first of all, I use REPLACE to do a simple string search and replace in the original ?date value - I replace spaces with a &amp;#x201C;T&amp;#x201D;. REPLACE is one of the many functions that SPARQL offers to test or manipulate values\n- another one is STRDT, which I use to assign the datatype xsd:dateTime to the new value\n- to make sure I can use this new value in my CONSTRUCT clause, I&amp;#x2019;m using the BIND AS keyword. In general, you use BIND AS to create some new or derived values that were not part of the source data. Here, I&amp;#x2019;m introducing the new variable ?date_fixed, which I want to bind to the date in the correct format. This new variable will be added to the result.\n- finally, in the CONSTRUCT clause, I define the triple pattern for the output. What happens is that for every matching pattern from the WHERE clause, I will create this new pattern. The only thing that is different between the two is actually the object, where I use the ?data_fixed variable\n- you can, however, create any RDF you want in a CONSTRUCT\n- ok, the final output of this query is an RDF graph like this\n\n
  72. - the previous query only gave us the records and their dates - this would be enough for our use case, but lets assume for a moment that we want to create a fixed copy of the complete dataset\n- we could do that by constructing a second graph without any dc:date statements\n- if we join that with the previous graph, we have our complete, fixed dataset\n- to do this, let me introduce the FILTER command. You add that to the WHERE clause in order to filter the results. You can specify a condition that is checked every time the graph pattern matches. The result will only be added if the FILTER expression is also true.\n- In this case, the pattern in the WHERE clause is the infamous ?s ?p ?o pattern, so it matches every triple on the source data. Without a filter, this would give us the complete dataset back.\n- however, the FILTER, which takes a boolean expression, defines a condition that is only met if the value of ?p is not dce:date. In other words, every time we come across a triple specifying a date, we remove that from the list of results. The end result is a copy of the original dataset, minus all dce:date triples.\n- these were two examples for CONSTRUCT queries - there will be a lot more and more detailed ones in the schema mapping part in the afternoon\n\n
  73. - great! Now we have everything we need to formulate our query of &amp;#x201C;give me all albums made in July 2007&amp;#x201D;\n- this query doesn&amp;#x2019;t introduce anything new, but uses features that we already know\n- we create a graph pattern that gets us all instances of mo:Record, as well as their ?release_date and ?title.\n- we add a filter to say that we only want to have albums where the year of the release date is 2007, and the month is July. For this, we use two of the date functions that were introduced in SPARQL 1.1 \n- Actually, we only did the last few steps of creating new data because we wanted to use these functions, which only work on xsd:dateTime literals.\n- finally, we order the results by release date\n
  74. \n
  75. - ok remember we also wanted to find out all artists in France?\n- well, it turns out that the Jamendo dataset already has part of the answer for that - the foaf:based_near property. Let&amp;#x2019;s see what that gives us:\n- a list of geonames URIs\n- unfortunately, the Jamendo dataset doesn&amp;#x2019;t have any other information about these URIs, so we cannot know what they refer to, let alone which of them are in France!\n- therefore, we need to query the geonames dataset itself\n
  76. - ok remember we also wanted to find out all artists in France?\n- well, it turns out that the Jamendo dataset already has part of the answer for that - the foaf:based_near property. Let&amp;#x2019;s see what that gives us:\n- a list of geonames URIs\n- unfortunately, the Jamendo dataset doesn&amp;#x2019;t have any other information about these URIs, so we cannot know what they refer to, let alone which of them are in France!\n- therefore, we need to query the geonames dataset itself\n
  77. - now, geonames doesn&amp;#x2019;t have its own, authoritative SPARQL endpoint, but there are several other ones out there\n- I&amp;#x2019;m going to use the Kasabi one. \n- Factforge contains several different datasets behind the same endpoint (and is a little bit slower)\n
  78. - to query a remote SPARQL endpoint, we can use the SERVICE keyword in the WHERE clause\n- what it does is indicate that for the following graph patterns the external endpoint should be queried, rather than local data\n- the query itself is very simple - we just want to explore geonames to get all the properties of geonames resources\n- some interesting properties that we get are the names and parent countries of places\n- you see the apikey parameter in the service URI - that something specific to Kasabi. Most SPARQL endpoints won&amp;#x2019;t require a URI key\n- you can use the key here to experiment, it&amp;#x2019;s for the &amp;#x201C;latc-tutorial&amp;#x201D; user\n- however, for serious use you should sign up yourself and get your own API key\n
  79. - to query a remote SPARQL endpoint, we can use the SERVICE keyword in the WHERE clause\n- what it does is indicate that for the following graph patterns the external endpoint should be queried, rather than local data\n- the query itself is very simple - we just want to explore geonames to get all the properties of geonames resources\n- some interesting properties that we get are the names and parent countries of places\n- you see the apikey parameter in the service URI - that something specific to Kasabi. Most SPARQL endpoints won&amp;#x2019;t require a URI key\n- you can use the key here to experiment, it&amp;#x2019;s for the &amp;#x201C;latc-tutorial&amp;#x201D; user\n- however, for serious use you should sign up yourself and get your own API key\n
  80. - to query a remote SPARQL endpoint, we can use the SERVICE keyword in the WHERE clause\n- what it does is indicate that for the following graph patterns the external endpoint should be queried, rather than local data\n- the query itself is very simple - we just want to explore geonames to get all the properties of geonames resources\n- some interesting properties that we get are the names and parent countries of places\n- you see the apikey parameter in the service URI - that something specific to Kasabi. Most SPARQL endpoints won&amp;#x2019;t require a URI key\n- you can use the key here to experiment, it&amp;#x2019;s for the &amp;#x201C;latc-tutorial&amp;#x201D; user\n- however, for serious use you should sign up yourself and get your own API key\n
  81. - to query a remote SPARQL endpoint, we can use the SERVICE keyword in the WHERE clause\n- what it does is indicate that for the following graph patterns the external endpoint should be queried, rather than local data\n- the query itself is very simple - we just want to explore geonames to get all the properties of geonames resources\n- some interesting properties that we get are the names and parent countries of places\n- you see the apikey parameter in the service URI - that something specific to Kasabi. Most SPARQL endpoints won&amp;#x2019;t require a URI key\n- you can use the key here to experiment, it&amp;#x2019;s for the &amp;#x201C;latc-tutorial&amp;#x201D; user\n- however, for serious use you should sign up yourself and get your own API key\n
  82. - we can easily combine local and remote sources, as you can see here\n- this is where things become interesting!\n- part of the graph pattern is queried locally, the other one over the remote endpoint\n- we get the artist&amp;#x2019;s location locally from the Jamendo dataset, and then we get the name of that location from the remote SPARQL endpoint\n- note the LIMIT statement at the end of the query - if I didn&amp;#x2019;t do that, the query would time out\n- when querying data, you always have a to be a little bit careful - it&amp;#x2019;s easy to write a query that takes a very long time to execute, that let&amp;#x2019;s the processor run out of memory, etc.\n- especially when querying remote services\n
  83. - before we can ask which artists are in France, we need to know the identifier for France\n- for this, we need to query the remote endpoint again\n- we ask for resources which have a geonames:featureCode A.PCLI (i.e., they are a country)\n- then we filter the results with a regular expression\n- et voil&amp;#xE0;, France is &lt;http://sws.geonames.org/3017382/&gt;!\n
  84. - so, now that we have the identifier for France, we can do a first attempt to query for artists in France\n- this is great!\n- however, this actually only gives us those artists which directly use France, the country as their location\n- this means we are missing those which specify places like Paris or Lyon as their location - places which located within France!\n- we want places which have France as geonames:parentCountry \n
  85. - we can get this information from geonames, so we do a federated query again\n- notice I&amp;#x2019;m limiting the result to 10, otherwise it would simply take way to long, or even time out\n- even with the LIMIT it takes ages for this query to finish (several minutes)\n- this illustrates that, while it&amp;#x2019;s great to have online SPARQL endpoints, for many purposes they&amp;#x2019;re not feasible\n- what we can do in a case like that is extract a slice of data from the endpoint, and run the query again locally\n
  86. - we extract data about all places in France and their names from geonames\n- this is a very practical approach of handling external datasets, which might otherwise be too large to query efficiently (especially in a federated scenario)\n- the result is written to a file\n
  87. - this is our final query, giving us all artists in Jamendo who are located in France!\n- I&amp;#x2019;m introducing one new thing here, the FROM keyword, which you can use to load different data sources into the default graph\n- here we are loading two local files, but you can just as well point to a URI on the Web\n- notice that, because &lt;http://sws.geonames.org/3017382/&gt; geonames:parentCountry &lt;http://sws.geonames.org/3017382/&gt;, \n
  88. - this is our final query, giving us all artists in Jamendo who are located in France!\n- I&amp;#x2019;m introducing one new thing here, the FROM keyword, which you can use to load different data sources into the default graph\n- here we are loading two local files, but you can just as well point to a URI on the Web\n- notice that, because &lt;http://sws.geonames.org/3017382/&gt; geonames:parentCountry &lt;http://sws.geonames.org/3017382/&gt;, \n
  89. - so far, we always assume that everything is in the same big RDF graph\n- that&amp;#x2019;s what is usually called the &amp;#x201C;default graph&amp;#x201D; in SPARQL\n- however, SPARQL knows about named graphs\n- we can load data into a named graph, rather than the default one, and then reference that graph in the query\n- e.g., here, we load the Geonames slice into a named graph with FROM NAMED (the name is its URI)\n- in the WHERE clause, we can then restrict part of the query to that graph\n- why would we want to do this? A SPARQL engine could be optimised for this, and the query might run faster\n
  90. - so far, we always assume that everything is in the same big RDF graph\n- that&amp;#x2019;s what is usually called the &amp;#x201C;default graph&amp;#x201D; in SPARQL\n- however, SPARQL knows about named graphs\n- we can load data into a named graph, rather than the default one, and then reference that graph in the query\n- e.g., here, we load the Geonames slice into a named graph with FROM NAMED (the name is its URI)\n- in the WHERE clause, we can then restrict part of the query to that graph\n- why would we want to do this? A SPARQL engine could be optimised for this, and the query might run faster\n
  91. \n
  92. - so far, we always assume that everything is in the same big RDF graph\n- that&amp;#x2019;s what is usually called the &amp;#x201C;default graph&amp;#x201D; in SPARQL\n- however, SPARQL knows about named graphs\n- we can load data into a named graph, rather than the default one, and then reference that graph in the query\n- e.g., here, we load the Geonames slice into a named graph with FROM NAMED (the name is its URI)\n- in the WHERE clause, we can then restrict part of the query to that graph\n- why would we want to do this? A SPARQL engine could be optimised for this, and the query might run faster\n
  93. - so far, we always assume that everything is in the same big RDF graph\n- that&amp;#x2019;s what is usually called the &amp;#x201C;default graph&amp;#x201D; in SPARQL\n- however, SPARQL knows about named graphs\n- we can load data into a named graph, rather than the default one, and then reference that graph in the query\n- e.g., here, we load the Geonames slice into a named graph with FROM NAMED (the name is its URI)\n- in the WHERE clause, we can then restrict part of the query to that graph\n- why would we want to do this? A SPARQL engine could be optimised for this, and the query might run faster\n
  94. \n
  95. \n