Intro to Linked Data: SPARQL

Preview:

Citation preview

An Introduction

toLinked Data

David Hyland-WoodUniversity of Mary Washington

Part 4 of 5SPARQL Query Language

Monday, May 16, 2011

SPARQL:A query

language for RDFMonday, May 16, 2011

SPARQL• Query Language for RDF

http://www.w3.org/TR/rdf-sparql-query

• SPARQL Protocol and RDF Query Language

• Graph pattern based languagewritten the same as Turtle

• Several queries — Ask; Select; Describe; Construct

• Read Onlystill vulnerable to injection, though not as bad as SQL

Monday, May 16, 2011

Queries• ASK — True or False

Simple, Fast

• SELECT — Tabular dataeasy to work with

• DESCRIBE — RDFwhatever the store has

• CONSTRUCT — RDFWhatever you want

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Triple Patterns

Monday, May 16, 2011

Triple Patterns

<http://example.com/spacecraft/1957-001B> foaf:name "Sputnik 1" .

Monday, May 16, 2011

Triple Patterns

<http://example.com/spacecraft/1957-001B> foaf:name "Sputnik 1" .

?something foaf:name "Sputnik 1" .

Monday, May 16, 2011

Triple Patterns

<http://example.com/spacecraft/1957-001B> foaf:name "Sputnik 1" .

?something foaf:name "Sputnik 1" .

?something foaf:name ?name .

Monday, May 16, 2011

Triple Patterns

<http://example.com/spacecraft/1957-001B> foaf:name "Sputnik 1" .

?something foaf:name "Sputnik 1" .

?something foaf:name ?name .

ASK WHERE { ?something foaf:name "Sputnik 1" .}

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Triple Patterns

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

ASK WHERE { ?something rdfs:label ?label .}

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Triple Patterns

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

ASK WHERE { ?something rdfs:label ?label ; rdf:type space:Discipline .}

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Triple Patterns

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>

ASK WHERE { ?spacecraft foaf:name “Sputnik 1” . ?launch space:spacecraft ?spacecraft . ?launch space:launched ?launchdate .}

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Example SELECT

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?subject ?label WHERE {

?subject rdfs:label ?label ; a space:Discipline .

}

Monday, May 16, 2011

Example SELECT<sparql xmlns="http://www.w3.org/2005/sparql-results#"> <head> <variable name="subject"/> <variable name="label"/> </head> <results> <result> <binding name="subject"> <uri>http://nasa.dataincubator.org/discipline/astronomy</uri> </binding> <binding name="label"> <literal>Astronomy</literal> </binding> </result> <result> <binding name="subject"> <uri>http://nasa.dataincubator.org/discipline/communications</uri> </binding> <binding name="label"> <literal>Communications</literal> </binding> </result>

Monday, May 16, 2011

Example SELECT

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT * WHERE {

?subject rdfs:label ?label ; a space:Discipline .

}

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Example SELECT DISTINCT

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?date WHERE {

?launch space:launched ?date .

}

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Example OPTIONAL

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT ?name ?image WHERE {

?spacecraft foaf:name ?name .

OPTIONAL { ?spacecraft foaf:depiction ?image . }}

Monday, May 16, 2011

Example OPTIONAL<?xml version="1.0"?><sparql xmlns="http://www.w3.org/2005/sparql-results#"> <head> <variable name="name"/> <variable name="image"/> </head> <results> <result> <binding name="name"> <literal>Soyuz 2</literal> </binding> </result> <result> <binding name="name"> <literal>Apollo 10</literal> </binding> <binding name="image"> <uri>http://nssdc.gsfc.nasa.gov/image/spacecraft/apollo_10_cm.jpg</uri> </binding> </result>

Monday, May 16, 2011

Example UNION

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?subject ?displayLabel WHERE { { ?subject foaf:name ?displayLabel . } UNION { ?subject rdfs:label ?displayLabel . }}

Monday, May 16, 2011

Example UNION<?xml version="1.0"?><sparql xmlns="http://www.w3.org/2005/sparql-results#"> <head> <variable name="subject"/> <variable name="displayLabel"/> </head> <results> <result> <binding name="subject"> <uri>http://nasa.dataincubator.org/spacecraft/ATLAS2</uri> </binding> <binding name="displayLabel"> <literal>Atlas 2</literal> </binding> </result> <result> <binding name="subject"> <uri>http://nasa.dataincubator.org/spacecraft/ATLAS3</uri> </binding> <binding name="displayLabel"> <literal>Atlas 3</literal> </binding> </result>

Monday, May 16, 2011

Example ORDER BY

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?name ?launchdate WHERE { ?spacecraft foaf:name ?name . ?launch space:spacecraft ?spacecraft . ?launch space:launched ?launchdate .}

Monday, May 16, 2011

Example ORDER BY

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?name ?launchdate WHERE { ?spacecraft foaf:name ?name . ?launch space:spacecraft ?spacecraft . ?launch space:launched ?launchdate .}ORDER BY DESC(?launchdate)

Monday, May 16, 2011

Example ORDER BY

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?name ?launchdate WHERE { ?spacecraft foaf:name ?name . ?launch space:spacecraft ?spacecraft . ?launch space:launched ?launchdate .}ORDER BY DESC(?launchdate)LIMIT 10

Monday, May 16, 2011

Example ORDER BY

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?name ?launchdate WHERE { ?spacecraft foaf:name ?name . ?launch space:spacecraft ?spacecraft . ?launch space:launched ?launchdate .}ORDER BY DESC(?launchdate)LIMIT 10OFFSET 10

Monday, May 16, 2011

Example FILTER

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?name WHERE { ?launch space:launched ?date ; space:spacecraft ?spacecraft . ?spacecraft foaf:name ?name .

FILTER ( ?date >= "1969-01-01"^^xsd:date && ?date <= "1969-12-31"^^xsd:date )}

Monday, May 16, 2011

Example FILTER

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?spacecraft ?name WHERE { ?spacecraft foaf:name ?name ; space:mass ?mass . FILTER( xsd:double(?mass) < 90.0 )}

Monday, May 16, 2011

Example FILTER

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?name WHERE {

?spacecraft foaf:name ?name . FILTER( regex(?name, “ollo”, “i” ) )}

Monday, May 16, 2011

Built-in Filters• Logical (!, &&, ||)

• Math (+, -, *, /)

• Comparison (=, !=, >, <, ...)

• TestsisURI, isBlank, isLiteral, bound, sameTerm, langMatches, regex

• Accessorsstr, lang, datatype

Monday, May 16, 2011

Example NOT

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT ?s WHERE {

?s a space:Spacecraft .

OPTIONAL { ?s foaf:depiction ?image . }

FILTER ( !bound(?image) )}

Monday, May 16, 2011

Queries• ASK — True or False

Simple, Fast

• SELECT — Tabular dataeasy to work with

• DESCRIBE — RDFwhatever the store has

• CONSTRUCT — RDFWhatever you want

Monday, May 16, 2011

Example DESCRIBE

DESCRIBE <http://example.com/launch/1969-059>

Monday, May 16, 2011

Example DESCRIBE<rdf:RDF xmlns:space="http://purl.org/net/schemas/space/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >

<rdf:Description rdf:about="http://nasa.dataincubator.org/launch/1969-059"> <space:spacecraft rdf:resource="http://nasa.dataincubator.org/spacecraft/1969-059C"/> <space:spacecraft rdf:resource="http://nasa.dataincubator.org/spacecraft/1969-059B"/> <space:spacecraft rdf:resource="http://nasa.dataincubator.org/spacecraft/1969-059A"/> <space:launchvehicle>Saturn 5</space:launchvehicle> <space:launchsite rdf:resource="http://nasa.dataincubator.org/launchsite/capecana..."/> <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date"> 1969-07-16 </space:launched> <rdf:type rdf:resource="http://purl.org/net/schemas/space/Launch"/> </rdf:Description> </rdf:RDF>

Monday, May 16, 2011

Example DESCRIBE

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

DESCRIBE ?spacecraft WHERE {

?launch space:launched "1969-07-16"^^xsd:date . ?spacecraft space:launch ?launch .

}

Monday, May 16, 2011

Example DESCRIBE<rdf:RDF xmlns:space="http://purl.org/net/schemas/space/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" > <rdf:Description rdf:about="http://nasa.dataincubator.org/spacecraft/1969-059B"> <foaf:homepage rdf:resource="http://nssdc.gsfc.nasa.gov/database/MasterCatalog?sc=1969-059B"/> <dc:description>The...</dc:description> <space:mission rdf:resource="http://nasa.dataincubator.org/mission/apollo-11"/> <space:agency>United States</space:agency> <rdf:type rdf:resource="http://purl.org/net/schemas/space/Spacecraft"/> <space:launch rdf:resource="http://nasa.dataincubator.org/launch/1969-059"/> <space:discipline rdf:resource="http://nasa.dataincubator.org/discipline/planetaryscience"/> <space:alternateName>04040</space:alternateName> <space:alternateName>Apollo 11 Saturn V third stage</space:alternateName> <foaf:name>Apollo 11 SIVB</foaf:name> <space:internationalDesignator>1969-059B</space:internationalDesignator> <space:mass>13300.0</space:mass> </rdf:Description> ...

Monday, May 16, 2011

Example DESCRIBE

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

DESCRIBE ?spacecraft ?launch WHERE {

?launch space:launched "1969-07-16"^^xsd:date . ?spacecraft space:launch ?launch .

}

Monday, May 16, 2011

Example CONSTRUCT

PREFIX space: <http://purl.org/net/schemas/space/>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>PREFIX foaf: <http://xmlns.com/foaf/0.1/>

CONSTRUCT { ?spacecraft foaf:name ?name ; space:agency ?agency ; space:launched ?launchdate . }WHERE { ?spacecraft foaf:name ?name ; space:agency ?agency . ?launch space:spacecraft ?spacecraft . ?launch space:launched ?launchdate .}

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

space:launched

Monday, May 16, 2011

Common Problems• Typos

wrong case for property or class name

• wrong prefix URImissing # or / or the URI for the web page

• Missing OPTIONALyou won't even notice...

• Comparing LiteralsLiterals are compared on all of value, type and language

Monday, May 16, 2011

Tip 1: Find all the Properties

SELECT DISTINCT ?p WHERE {

?s ?p ?o .

}

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Tip 2: Find all the Classes

SELECT DISTINCT ?type WHERE {

?s a ?type .

}

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Space Physicsspace:Discipline

space:Spacecraft

space:Launch

space:Launchsite

/discipline/spacephysics

/spacecraft/1957-001B

/launch/1957-001

/launchsite/tyurata

a

a

a

a

space:discipline

space:spacecraft

space:launchsite

Sputnik 1

The Sputnik 1 spacecraft was ...

U.S.S.R

86.3

1957-10-04

Modified SS-6 (Sapwood)

Tyuratam (Baikonur Cosmodrome)

U.S.S.R

rdfs:label

space:country

foaf:name

dc:description

space:agency

space:mass

space:launched

space:launchvehicle

rdfs:label

/images/sputnik.jpgfoaf:depiction

Monday, May 16, 2011

Thanks to

• Rob Styles, Talis Group Ltd for his CC-BY licensed “Two Day Introduction to the Web of Data” slides and spacecraft example data.

Monday, May 16, 2011

This work is Copyright © 2010 David Hyland-WoodBased partially on CC-BY licensed content Copyright © 2010 Talis Systems Limited by Rob Styles. It is licensed under the Creative Commons Attribution 3.0 Unported License.Full details at: http://creativecommons.org/licenses/by/3.0/

You are free:

to Share — to copy, distribute and transmit the work

to Remix — to adapt the work

Under the following conditions:

Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

• For any reuse or distribution, you must make clear to others the license terms of this work.• Any of the above conditions can be waived if you get permission from the copyright holder.• Nothing in this license impairs or restricts the author's moral rights.• Some Content in the work may be licensed under different terms, this is noted separately.

Monday, May 16, 2011

Recommended