SlideShare a Scribd company logo
1 of 34
SPARQL in the Semantic Web
Jan Carl Beeck Pepper
1
Agenda
โ€ข Definitions and Motivation
โ€ข SPARQL
2
Definitions and Motivation
โ€ข Statement (or triple):
โ€“ Small piece of knowledge (a single fact).
โ€“ It has Subject-Predicate-Object.
โ€“ Ex. Evidence A is_a physiotherapy evidence.
โ€“ Ex. <subj0> <pred0> <obj0>
โ€ข Subject (resource) and Object (value):
โ€“ Names for things in the world.
โ€ข Predicate (property):
โ€“ Name of a relation that connects two things.
3
Definitions and Motivation
โ€ข Semantic Web:
โ€“ It is built on top of the current Web.
โ€“ Besides the HTML constructs, it contains some
โ€œstatementsโ€ that can be collected by an agent.
โ€“ The agent organizes and connects the statements
into a graph format (data integration).
โ€“ Automatic data integration on the Web can be
powerful and can help a lot when it comes to
information discovery and retrieval.
4
Definitions and Motivation
โ€ข Query-based-language:
โ€“ The agent should be able to process some
common queries that are submitted against the
statements it has collected. After all, without
providing a query interface, the collected
statements will not be of too much use to us.
5
Definitions and Motivation
โ€ข Linked Data:
โ€“ A collection of machine-understandable
statements, published without having them
related to any Web site at all.
โ€ข Web of Data:
โ€“ Interchangeable terms for the Semantic Web.
6
Definitions and Motivation
โ€ข Resource description framework (RDF):
โ€“ The building block for the Semantic Web.
โ€“ Standard for encoding metadata.
โ€ข Metadata: describe the data contained on the Web.
โ€ข Machine understandable (also interoperability).
โ€ข Domain independent.
โ€“ Describe any resources and their relations existing
in the real world.
โ€“ RDF is for the Semantic Web what HTML has been
for the Web.
7
Definitions and Motivation
โ€ข RDF Schema (RDFS):
โ€“ Stands for RDF Schema.
โ€“ Common language, or, a vocabulary, where
classes, sub-classes, properties, and also relation
between the classes and properties are defined.
โ€“ Domain-specific.
โ€“ Allow the creation of distributed RDF documents.
8
Definitions and Motivation
โ€ข Web Ontology Language (OWL):
โ€“ Is the most popular language to use when creating
ontologies.
โ€“ Is build upon RDF Schema.
โ€“ Has the same purpose as RDF Schema.
โ€ข Classes, properties, and their relationships for a specific
application domain.
โ€“ Provides the capability to express much more
complex and richer relationships (better
expressiveness).
9
Definitions and Motivation
โ€ข Web Ontology Language (OWL):
โ€“ Axiom: basic statement (basic piece of
knowledge).
โ€“ A collection of axioms is an OWL Ontology.
โ€“ Protรฉgรฉ is free OWL editor.
โ€ข IRI:
โ€“ Stands for Internationalized Resource Identifiers
(like URIs with Unicode characters).
10
Definitions and Motivation
โ€ข Computer Ontology:
โ€“ Reflects the structure of the world.
โ€“ Is often about structure of the concepts.
โ€“ Each statement collected by an agent represents a
piece of knowledge. Therefore, there has to be a
way (a model) to represent knowledge on the
Web. Furthermore, this model of representing
knowledge has to be easily and readily processed
(understood) by machines.
11
Definitions and Motivation
โ€ข Computer Ontology:
โ€“ An application can understand a given ontology;
that means the application can parse the ontology
and create a list of axioms based on the ontology,
and all the facts are expressed as RDF statements.
12
Agenda
โ€ข Definitions and Motivation
โ€ข SPARQL
13
SPARQL
โ€ข SPARQL: Querying the Semantic Web.
โ€“ Pronounced โ€œsplarkleโ€
โ€“ Stands for SPARQL Protocol and RDF Query
Language.
โ€“ Locate specific information on the machine-
readable Web.
โ€“ The Web can be viewed as a gigantic database.
14
SPARQL (cont)
โ€ข Related concepts:
โ€“ RDF data store: is a special database system built
for the storage and retrieval of RDF statements.
โ€ข Every record is a short statement in the form of
subject-predicate-object.
โ€ข Store RDF statements and retrieve them by using a
query language.
โ€“ Triple pattern: any or all the subject, predicate,
and object values can be a variable.
โ€ข <http://danbri.org/foaf.rdf#danbri> foaf:name ?name.
15
SPARQL (cont)
โ€ข Graph pattern: is used to select triples from a
given RDF graph.
โ€“ Is a collection of triple patterns.
โ€“ { ?who foaf:name ?name.
?who foaf:interest ?interest.
?who foaf:knows ?others. }
โ€“ Note: FOAF (friend of a friend) is an Ontology (a
group of properties that describes a person) and a
collection of RDF statements.
16
SPARQL (cont)
โ€ข SPARQL engine:
โ€“ Tries to match the triples contained in the graph
patterns against the RDF graph, which is a
collection of triples.
โ€“ Once a match is successful, it will bind the graph
patternโ€™s variables to the graphโ€™s nodes, and one
such variable binding is called a query solution.
17
SPARQL (cont)
โ€ข SPARQL endpoint:
โ€“ Interface that users (human or apps) can access to
query an RDF data store by using SPARQL query
language.
โ€ข Web-based application.
โ€ข Set of APIs that can be used by an agent.
โ€“ Ex. Joseki Web-based SPARQL.
โ€ข http://sparql.org/sparql.html
18
SPARQL (cont)
โ€ข SPARQL Query Language:
โ€“ SELECT query (most frequently used).
โ€“ ASK query.
โ€“ DESCRIBE query.
โ€“ CONSTRUCT query.
19
SPARQL (cont)
โ€ข Structure of a SELECT Query:
โ€“ # base directive
BASE <URI>
# list of prefixes
PREFIX pref: <URI>
...
# result description
SELECT...
# graph to search
FROM . . .
# query pattern
WHERE {
...
}
# query modifiers
ORDER BY... 20
SPARQL (cont)
โ€ข Ex. Find all the picture formats used by Dan Brickleyโ€™s friends (from graph
http://danbri.org/foaf.rdf#danbri).
21
SPARQL (cont)
โ€ข The query finds all the picture format used by Dan Bricley's friends.
โ€ข Base define the source file (graph) which link is: http...
โ€ข prefix define the ontology of persons foaf which link is: http...
โ€ข the other prefix define the image format ontology dc which link is: http...
โ€ข select * from the source graph
โ€ข where is defined the term dambri in the foaf ontology throw the knows
attribute and store that information in the variable ?friend
โ€ข where ?friend has a description of the image throw the attribute
foaf:depiction and store that information in the variable ?picture
โ€ข where ?picture has the name of the image format throw attribute
dc:format and store the name in the variable ?imageFormat
22
SPARQL (cont)
23
SPARQL (cont)
โ€ข Optional keyword: is needed because RDF
data graph is only a semi-structured data
model.
โ€“ i.e. two instances of the same class type in a given
RDF graph may have different set of property
instances created for each one of them.
โ€“ The query says, find all the people known by Dan
Brickley and show their name, e-mail, and home
page information if any of this information is
available.
24
SPARQL (cont)
25
SPARQL (cont)
26
SPARQL (cont)
โ€ข Solution modifiers:
โ€“ Distinct: eliminate duplicate solutions from the
result.
โ€“ Order by:
โ€ข Asc (): ascending.
โ€ข Desc (): descending.
โ€“ Limit: set the maximum number of solutions.
โ€“ Offset: sets the number of solutions to be skipped.
27
SPARQL (cont)
โ€ข Filter keyword to add value constraints,
functions and operators.
28
SPARQL (cont)
โ€ข Union keyword:
โ€“ A query expressed by multiple graph patterns that
are mutually exclusive, and any solution will have
to match exactly one of these patterns
(alternative match).
29
SPARQL (cont)
โ€ข Multiple graphs:
โ€“ SPARQL allows us to query any number of named
graphs.
30
SPARQL (cont)
โ€ข Construct query:
โ€“ Returns a new RDF graph.
โ€ข Describe query:
โ€“ Return an RDF graph whose statement are
determined by the query processor.
โ€ข Ask query:
โ€“ The query processor simply returns a true or false
value.
31
SPARQL (cont)
โ€ข Aggregate functions:
โ€“ COUNT
โ€“ SUM
โ€“ MIN/MAX
โ€“ AVG
โ€“ GROUP_CONCAT
โ€“ SAMPLE
32
SPARQL (cont)
โ€ข Other operators and functions:
โ€“ NOT EXISTS
โ€“ MINUS
โ€“ Concat() : for expressions in a query.
โ€“ INSERT DATA
โ€“ DELETE DATA
โ€“ CREATE [SILENT] GRAPH <uri>
โ€“ DROP [SILENT] GRAPH <uri>
33
References
โ€ข Liyang Yu (2011). A Developerโ€™s Guide to the
Semantic Web. Springer. ISBN: 978-3-642-
15969-5.
โ€ข (2011) Huang J, Abadi D.J. and Ren K. Scalable
SPARQL Querying of Large RDF Graphs.
34

More Related Content

What's hot

RDF, linked data and semantic web
RDF, linked data and semantic webRDF, linked data and semantic web
RDF, linked data and semantic webJose Emilio Labra Gayo
ย 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLMyungjin Lee
ย 
The Semantic Web #9 - Web Ontology Language (OWL)
The Semantic Web #9 - Web Ontology Language (OWL)The Semantic Web #9 - Web Ontology Language (OWL)
The Semantic Web #9 - Web Ontology Language (OWL)Myungjin Lee
ย 
SHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudSHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudRichard Cyganiak
ย 
Federated SPARQL query processing over the Web of Data
Federated SPARQL query processing over the Web of DataFederated SPARQL query processing over the Web of Data
Federated SPARQL query processing over the Web of DataMuhammad Saleem
ย 
Querying Linked Data on Android
Querying Linked Data on AndroidQuerying Linked Data on Android
Querying Linked Data on AndroidEUCLID project
ย 
SWT Lecture Session 3 - SPARQL
SWT Lecture Session 3 - SPARQLSWT Lecture Session 3 - SPARQL
SWT Lecture Session 3 - SPARQLMariano Rodriguez-Muro
ย 
Resource description framework
Resource description frameworkResource description framework
Resource description frameworkhozifa1010
ย 
RDF Validation Future work and applications
RDF Validation Future work and applicationsRDF Validation Future work and applications
RDF Validation Future work and applicationsJose Emilio Labra Gayo
ย 
GDG Meets U event - Big data & Wikidata - no lies codelab
GDG Meets U event - Big data & Wikidata -  no lies codelabGDG Meets U event - Big data & Wikidata -  no lies codelab
GDG Meets U event - Big data & Wikidata - no lies codelabCAMELIA BOBAN
ย 
Semantic Pipes and Semantic Mashups
Semantic Pipes and Semantic MashupsSemantic Pipes and Semantic Mashups
Semantic Pipes and Semantic Mashupsgiurca
ย 
Introduction to RDF Data Model
Introduction to RDF Data ModelIntroduction to RDF Data Model
Introduction to RDF Data ModelCesar Augusto Nogueira
ย 
Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapesJose Emilio Labra Gayo
ย 
Knowledge graph construction with a faรงade - The SPARQL Anything Project
Knowledge graph construction with a faรงade - The SPARQL Anything ProjectKnowledge graph construction with a faรงade - The SPARQL Anything Project
Knowledge graph construction with a faรงade - The SPARQL Anything ProjectEnrico Daga
ย 

What's hot (19)

RDF, linked data and semantic web
RDF, linked data and semantic webRDF, linked data and semantic web
RDF, linked data and semantic web
ย 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQL
ย 
Presentation shexer
Presentation shexerPresentation shexer
Presentation shexer
ย 
The Semantic Web #9 - Web Ontology Language (OWL)
The Semantic Web #9 - Web Ontology Language (OWL)The Semantic Web #9 - Web Ontology Language (OWL)
The Semantic Web #9 - Web Ontology Language (OWL)
ย 
Linked (Open) Data
Linked (Open) DataLinked (Open) Data
Linked (Open) Data
ย 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
ย 
SHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudSHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data Mud
ย 
RDF validation tutorial
RDF validation tutorialRDF validation tutorial
RDF validation tutorial
ย 
Federated SPARQL query processing over the Web of Data
Federated SPARQL query processing over the Web of DataFederated SPARQL query processing over the Web of Data
Federated SPARQL query processing over the Web of Data
ย 
Querying Linked Data on Android
Querying Linked Data on AndroidQuerying Linked Data on Android
Querying Linked Data on Android
ย 
SWT Lecture Session 3 - SPARQL
SWT Lecture Session 3 - SPARQLSWT Lecture Session 3 - SPARQL
SWT Lecture Session 3 - SPARQL
ย 
Resource description framework
Resource description frameworkResource description framework
Resource description framework
ย 
RDF Validation Future work and applications
RDF Validation Future work and applicationsRDF Validation Future work and applications
RDF Validation Future work and applications
ย 
GDG Meets U event - Big data & Wikidata - no lies codelab
GDG Meets U event - Big data & Wikidata -  no lies codelabGDG Meets U event - Big data & Wikidata -  no lies codelab
GDG Meets U event - Big data & Wikidata - no lies codelab
ย 
Semantic Pipes and Semantic Mashups
Semantic Pipes and Semantic MashupsSemantic Pipes and Semantic Mashups
Semantic Pipes and Semantic Mashups
ย 
ShEx by Example
ShEx by ExampleShEx by Example
ShEx by Example
ย 
Introduction to RDF Data Model
Introduction to RDF Data ModelIntroduction to RDF Data Model
Introduction to RDF Data Model
ย 
Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
ย 
Knowledge graph construction with a faรงade - The SPARQL Anything Project
Knowledge graph construction with a faรงade - The SPARQL Anything ProjectKnowledge graph construction with a faรงade - The SPARQL Anything Project
Knowledge graph construction with a faรงade - The SPARQL Anything Project
ย 

Viewers also liked

Querying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLQuerying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLEmanuele Della Valle
ย 
Revista virtual
Revista virtualRevista virtual
Revista virtualImma Castellet
ย 
El solstice coupรฉ. antonio horacio stiuso
El solstice coupรฉ. antonio horacio stiusoEl solstice coupรฉ. antonio horacio stiuso
El solstice coupรฉ. antonio horacio stiusoAntonioCabrala
ย 
Historia universal
Historia universalHistoria universal
Historia universalJessica Zumba
ย 
5 Red Flags You've Outgrown you Learning Solution
5 Red Flags You've Outgrown you Learning Solution5 Red Flags You've Outgrown you Learning Solution
5 Red Flags You've Outgrown you Learning SolutionRyan Shirah
ย 
Cerebral Asymmetry: A Quantitative, Multifactorial and Plastic Brain Phenotype
Cerebral Asymmetry: A Quantitative, Multifactorial and Plastic Brain PhenotypeCerebral Asymmetry: A Quantitative, Multifactorial and Plastic Brain Phenotype
Cerebral Asymmetry: A Quantitative, Multifactorial and Plastic Brain PhenotypeMiguel E. Renterรญa, PhD
ย 
IPMARK sobre las I Jornadas de Publicitarios del S. XXI
IPMARK sobre las I Jornadas de Publicitarios del S. XXIIPMARK sobre las I Jornadas de Publicitarios del S. XXI
IPMARK sobre las I Jornadas de Publicitarios del S. XXIAlvaro Quesada
ย 
Global & local oxygen control in in vitro systems
Global & local oxygen control in in vitro systemsGlobal & local oxygen control in in vitro systems
Global & local oxygen control in in vitro systemsMAASTRO clinic
ย 
ยกยกYa vienen los Reyes Magos Calpe 2015!!
ยกยกYa vienen los Reyes Magos Calpe 2015!!ยกยกYa vienen los Reyes Magos Calpe 2015!!
ยกยกYa vienen los Reyes Magos Calpe 2015!!TurismoCalp
ย 
OSGi Mobile eclipsecon 09
OSGi Mobile eclipsecon 09OSGi Mobile eclipsecon 09
OSGi Mobile eclipsecon 09yonnyb
ย 
Aberraciones sexuales
Aberraciones sexualesAberraciones sexuales
Aberraciones sexualesdaniguzman
ย 
Equipo 2 nicte ha eduardo valdemar, nestor, arturo 137 a
Equipo 2  nicte ha eduardo valdemar, nestor, arturo 137 aEquipo 2  nicte ha eduardo valdemar, nestor, arturo 137 a
Equipo 2 nicte ha eduardo valdemar, nestor, arturo 137 aVladimix Leon
ย 
Automating Demand Draft Machine
Automating Demand Draft MachineAutomating Demand Draft Machine
Automating Demand Draft MachineMphasis
ย 
Estatutos del Partido Acciรณn Ciudadana
Estatutos del Partido Acciรณn CiudadanaEstatutos del Partido Acciรณn Ciudadana
Estatutos del Partido Acciรณn CiudadanaRebeca Bolaรฑos C.
ย 
Apresentando o OpenStreetMap no FISL
Apresentando o OpenStreetMap no FISLApresentando o OpenStreetMap no FISL
Apresentando o OpenStreetMap no FISLArlindo Pereira
ย 
Guiรณn literario de proyectos creativos con tics
Guiรณn literario de proyectos creativos con ticsGuiรณn literario de proyectos creativos con tics
Guiรณn literario de proyectos creativos con ticsSilvina Lemos
ย 
IO SATURNALIA
 IO SATURNALIA IO SATURNALIA
IO SATURNALIArosaalmaida
ย 

Viewers also liked (20)

Querying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLQuerying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQL
ย 
Nov03 agenda
Nov03 agendaNov03 agenda
Nov03 agenda
ย 
Revista virtual
Revista virtualRevista virtual
Revista virtual
ย 
El solstice coupรฉ. antonio horacio stiuso
El solstice coupรฉ. antonio horacio stiusoEl solstice coupรฉ. antonio horacio stiuso
El solstice coupรฉ. antonio horacio stiuso
ย 
Historia universal
Historia universalHistoria universal
Historia universal
ย 
5 Red Flags You've Outgrown you Learning Solution
5 Red Flags You've Outgrown you Learning Solution5 Red Flags You've Outgrown you Learning Solution
5 Red Flags You've Outgrown you Learning Solution
ย 
Cerebral Asymmetry: A Quantitative, Multifactorial and Plastic Brain Phenotype
Cerebral Asymmetry: A Quantitative, Multifactorial and Plastic Brain PhenotypeCerebral Asymmetry: A Quantitative, Multifactorial and Plastic Brain Phenotype
Cerebral Asymmetry: A Quantitative, Multifactorial and Plastic Brain Phenotype
ย 
IPMARK sobre las I Jornadas de Publicitarios del S. XXI
IPMARK sobre las I Jornadas de Publicitarios del S. XXIIPMARK sobre las I Jornadas de Publicitarios del S. XXI
IPMARK sobre las I Jornadas de Publicitarios del S. XXI
ย 
Global & local oxygen control in in vitro systems
Global & local oxygen control in in vitro systemsGlobal & local oxygen control in in vitro systems
Global & local oxygen control in in vitro systems
ย 
ยกยกYa vienen los Reyes Magos Calpe 2015!!
ยกยกYa vienen los Reyes Magos Calpe 2015!!ยกยกYa vienen los Reyes Magos Calpe 2015!!
ยกยกYa vienen los Reyes Magos Calpe 2015!!
ย 
The Progress Index
The Progress IndexThe Progress Index
The Progress Index
ย 
OSGi Mobile eclipsecon 09
OSGi Mobile eclipsecon 09OSGi Mobile eclipsecon 09
OSGi Mobile eclipsecon 09
ย 
Better Builder Issue 3
Better Builder Issue 3Better Builder Issue 3
Better Builder Issue 3
ย 
Aberraciones sexuales
Aberraciones sexualesAberraciones sexuales
Aberraciones sexuales
ย 
Equipo 2 nicte ha eduardo valdemar, nestor, arturo 137 a
Equipo 2  nicte ha eduardo valdemar, nestor, arturo 137 aEquipo 2  nicte ha eduardo valdemar, nestor, arturo 137 a
Equipo 2 nicte ha eduardo valdemar, nestor, arturo 137 a
ย 
Automating Demand Draft Machine
Automating Demand Draft MachineAutomating Demand Draft Machine
Automating Demand Draft Machine
ย 
Estatutos del Partido Acciรณn Ciudadana
Estatutos del Partido Acciรณn CiudadanaEstatutos del Partido Acciรณn Ciudadana
Estatutos del Partido Acciรณn Ciudadana
ย 
Apresentando o OpenStreetMap no FISL
Apresentando o OpenStreetMap no FISLApresentando o OpenStreetMap no FISL
Apresentando o OpenStreetMap no FISL
ย 
Guiรณn literario de proyectos creativos con tics
Guiรณn literario de proyectos creativos con ticsGuiรณn literario de proyectos creativos con tics
Guiรณn literario de proyectos creativos con tics
ย 
IO SATURNALIA
 IO SATURNALIA IO SATURNALIA
IO SATURNALIA
ย 

Similar to SPARQL in the Semantic Web

First Steps in Semantic Data Modelling and Search & Analytics in the Cloud
First Steps in Semantic Data Modelling and Search & Analytics in the CloudFirst Steps in Semantic Data Modelling and Search & Analytics in the Cloud
First Steps in Semantic Data Modelling and Search & Analytics in the CloudOntotext
ย 
Re-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutRe-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutMediaMixerCommunity
ย 
Longwell final ppt
Longwell final pptLongwell final ppt
Longwell final pptKuldeep Singh
ย 
State of the Semantic Web
State of the Semantic WebState of the Semantic Web
State of the Semantic WebIvan Herman
ย 
Wi2015 - Clustering of Linked Open Data - the LODeX tool
Wi2015 - Clustering of Linked Open Data - the LODeX toolWi2015 - Clustering of Linked Open Data - the LODeX tool
Wi2015 - Clustering of Linked Open Data - the LODeX toolLaura Po
ย 
ISWC GoodRelations Tutorial Part 2
ISWC GoodRelations Tutorial Part 2ISWC GoodRelations Tutorial Part 2
ISWC GoodRelations Tutorial Part 2Martin Hepp
ย 
GoodRelations Tutorial Part 2
GoodRelations Tutorial Part 2GoodRelations Tutorial Part 2
GoodRelations Tutorial Part 2guestecacad2
ย 
CSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web TutorialCSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web TutorialLeeFeigenbaum
ย 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQLLino Valdivia
ย 
semantic web & natural language
semantic web & natural languagesemantic web & natural language
semantic web & natural languageNurfadhlina Mohd Sharef
ย 
SemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in PracticeSemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in PracticeDan Brickley
ย 
Usage of Linked Data: Introduction and Application Scenarios
Usage of Linked Data: Introduction and Application ScenariosUsage of Linked Data: Introduction and Application Scenarios
Usage of Linked Data: Introduction and Application ScenariosEUCLID project
ย 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic webMarakana Inc.
ย 
The web of interlinked data and knowledge stripped
The web of interlinked data and knowledge strippedThe web of interlinked data and knowledge stripped
The web of interlinked data and knowledge strippedSรถren Auer
ย 
Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011Juan Sequeda
ย 
Linked data for librarians
Linked data for librariansLinked data for librarians
Linked data for librarianstrevorthornton
ย 
Spark meetup TCHUG
Spark meetup TCHUGSpark meetup TCHUG
Spark meetup TCHUGRyan Bosshart
ย 
ontology.ppt
ontology.pptontology.ppt
ontology.pptPrerak10
ย 

Similar to SPARQL in the Semantic Web (20)

Analysis on semantic web layer cake entities
Analysis on semantic web layer cake entitiesAnalysis on semantic web layer cake entities
Analysis on semantic web layer cake entities
ย 
First Steps in Semantic Data Modelling and Search & Analytics in the Cloud
First Steps in Semantic Data Modelling and Search & Analytics in the CloudFirst Steps in Semantic Data Modelling and Search & Analytics in the Cloud
First Steps in Semantic Data Modelling and Search & Analytics in the Cloud
ย 
Re-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutRe-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playout
ย 
Longwell final ppt
Longwell final pptLongwell final ppt
Longwell final ppt
ย 
State of the Semantic Web
State of the Semantic WebState of the Semantic Web
State of the Semantic Web
ย 
Wi2015 - Clustering of Linked Open Data - the LODeX tool
Wi2015 - Clustering of Linked Open Data - the LODeX toolWi2015 - Clustering of Linked Open Data - the LODeX tool
Wi2015 - Clustering of Linked Open Data - the LODeX tool
ย 
ISWC GoodRelations Tutorial Part 2
ISWC GoodRelations Tutorial Part 2ISWC GoodRelations Tutorial Part 2
ISWC GoodRelations Tutorial Part 2
ย 
GoodRelations Tutorial Part 2
GoodRelations Tutorial Part 2GoodRelations Tutorial Part 2
GoodRelations Tutorial Part 2
ย 
CSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web TutorialCSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web Tutorial
ย 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQL
ย 
semantic web & natural language
semantic web & natural languagesemantic web & natural language
semantic web & natural language
ย 
SemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in PracticeSemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in Practice
ย 
Usage of Linked Data: Introduction and Application Scenarios
Usage of Linked Data: Introduction and Application ScenariosUsage of Linked Data: Introduction and Application Scenarios
Usage of Linked Data: Introduction and Application Scenarios
ย 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic web
ย 
The web of interlinked data and knowledge stripped
The web of interlinked data and knowledge strippedThe web of interlinked data and knowledge stripped
The web of interlinked data and knowledge stripped
ย 
Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011
ย 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDF
ย 
Linked data for librarians
Linked data for librariansLinked data for librarians
Linked data for librarians
ย 
Spark meetup TCHUG
Spark meetup TCHUGSpark meetup TCHUG
Spark meetup TCHUG
ย 
ontology.ppt
ontology.pptontology.ppt
ontology.ppt
ย 

Recently uploaded

( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...nilamkumrai
ย 
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft DatingDubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Datingkojalkojal131
ย 
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...Diya Sharma
ย 
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort ServiceEnjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort ServiceDelhi Call girls
ย 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
ย 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
ย 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls DubaiEscorts Call Girls
ย 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...SUHANI PANDEY
ย 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
ย 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
ย 
Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
ย 
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...SUHANI PANDEY
ย 
Enjoy NightโšกCall Girls Samalka Delhi >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Samalka Delhi >เผ’8448380779 Escort ServiceEnjoy NightโšกCall Girls Samalka Delhi >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Samalka Delhi >เผ’8448380779 Escort ServiceDelhi Call girls
ย 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...roncy bisnoi
ย 
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
ย 
Call Now โ˜Ž 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now โ˜Ž 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.soniya singh
ย 
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445ruhi
ย 
Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...
Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...
Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...Delhi Call girls
ย 

Recently uploaded (20)

( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
ย 
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft DatingDubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
ย 
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
โ‚น5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] ๐Ÿ”|97111...
ย 
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort ServiceEnjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Dlf City Phase 3 Gurgaon >เผ’8448380779 Escort Service
ย 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
ย 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
ย 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
ย 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
ย 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
ย 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
ย 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
ย 
Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
ย 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
ย 
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
ย 
Enjoy NightโšกCall Girls Samalka Delhi >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Samalka Delhi >เผ’8448380779 Escort ServiceEnjoy NightโšกCall Girls Samalka Delhi >เผ’8448380779 Escort Service
Enjoy NightโšกCall Girls Samalka Delhi >เผ’8448380779 Escort Service
ย 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
ย 
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
ย 
Call Now โ˜Ž 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now โ˜Ž 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
ย 
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
ย 
Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...
Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...
Hireโ† Young Call Girls in Tilak nagar (Delhi) โ˜Ž๏ธ 9205541914 โ˜Ž๏ธ Independent Esc...
ย 

SPARQL in the Semantic Web

  • 1. SPARQL in the Semantic Web Jan Carl Beeck Pepper 1
  • 2. Agenda โ€ข Definitions and Motivation โ€ข SPARQL 2
  • 3. Definitions and Motivation โ€ข Statement (or triple): โ€“ Small piece of knowledge (a single fact). โ€“ It has Subject-Predicate-Object. โ€“ Ex. Evidence A is_a physiotherapy evidence. โ€“ Ex. <subj0> <pred0> <obj0> โ€ข Subject (resource) and Object (value): โ€“ Names for things in the world. โ€ข Predicate (property): โ€“ Name of a relation that connects two things. 3
  • 4. Definitions and Motivation โ€ข Semantic Web: โ€“ It is built on top of the current Web. โ€“ Besides the HTML constructs, it contains some โ€œstatementsโ€ that can be collected by an agent. โ€“ The agent organizes and connects the statements into a graph format (data integration). โ€“ Automatic data integration on the Web can be powerful and can help a lot when it comes to information discovery and retrieval. 4
  • 5. Definitions and Motivation โ€ข Query-based-language: โ€“ The agent should be able to process some common queries that are submitted against the statements it has collected. After all, without providing a query interface, the collected statements will not be of too much use to us. 5
  • 6. Definitions and Motivation โ€ข Linked Data: โ€“ A collection of machine-understandable statements, published without having them related to any Web site at all. โ€ข Web of Data: โ€“ Interchangeable terms for the Semantic Web. 6
  • 7. Definitions and Motivation โ€ข Resource description framework (RDF): โ€“ The building block for the Semantic Web. โ€“ Standard for encoding metadata. โ€ข Metadata: describe the data contained on the Web. โ€ข Machine understandable (also interoperability). โ€ข Domain independent. โ€“ Describe any resources and their relations existing in the real world. โ€“ RDF is for the Semantic Web what HTML has been for the Web. 7
  • 8. Definitions and Motivation โ€ข RDF Schema (RDFS): โ€“ Stands for RDF Schema. โ€“ Common language, or, a vocabulary, where classes, sub-classes, properties, and also relation between the classes and properties are defined. โ€“ Domain-specific. โ€“ Allow the creation of distributed RDF documents. 8
  • 9. Definitions and Motivation โ€ข Web Ontology Language (OWL): โ€“ Is the most popular language to use when creating ontologies. โ€“ Is build upon RDF Schema. โ€“ Has the same purpose as RDF Schema. โ€ข Classes, properties, and their relationships for a specific application domain. โ€“ Provides the capability to express much more complex and richer relationships (better expressiveness). 9
  • 10. Definitions and Motivation โ€ข Web Ontology Language (OWL): โ€“ Axiom: basic statement (basic piece of knowledge). โ€“ A collection of axioms is an OWL Ontology. โ€“ Protรฉgรฉ is free OWL editor. โ€ข IRI: โ€“ Stands for Internationalized Resource Identifiers (like URIs with Unicode characters). 10
  • 11. Definitions and Motivation โ€ข Computer Ontology: โ€“ Reflects the structure of the world. โ€“ Is often about structure of the concepts. โ€“ Each statement collected by an agent represents a piece of knowledge. Therefore, there has to be a way (a model) to represent knowledge on the Web. Furthermore, this model of representing knowledge has to be easily and readily processed (understood) by machines. 11
  • 12. Definitions and Motivation โ€ข Computer Ontology: โ€“ An application can understand a given ontology; that means the application can parse the ontology and create a list of axioms based on the ontology, and all the facts are expressed as RDF statements. 12
  • 13. Agenda โ€ข Definitions and Motivation โ€ข SPARQL 13
  • 14. SPARQL โ€ข SPARQL: Querying the Semantic Web. โ€“ Pronounced โ€œsplarkleโ€ โ€“ Stands for SPARQL Protocol and RDF Query Language. โ€“ Locate specific information on the machine- readable Web. โ€“ The Web can be viewed as a gigantic database. 14
  • 15. SPARQL (cont) โ€ข Related concepts: โ€“ RDF data store: is a special database system built for the storage and retrieval of RDF statements. โ€ข Every record is a short statement in the form of subject-predicate-object. โ€ข Store RDF statements and retrieve them by using a query language. โ€“ Triple pattern: any or all the subject, predicate, and object values can be a variable. โ€ข <http://danbri.org/foaf.rdf#danbri> foaf:name ?name. 15
  • 16. SPARQL (cont) โ€ข Graph pattern: is used to select triples from a given RDF graph. โ€“ Is a collection of triple patterns. โ€“ { ?who foaf:name ?name. ?who foaf:interest ?interest. ?who foaf:knows ?others. } โ€“ Note: FOAF (friend of a friend) is an Ontology (a group of properties that describes a person) and a collection of RDF statements. 16
  • 17. SPARQL (cont) โ€ข SPARQL engine: โ€“ Tries to match the triples contained in the graph patterns against the RDF graph, which is a collection of triples. โ€“ Once a match is successful, it will bind the graph patternโ€™s variables to the graphโ€™s nodes, and one such variable binding is called a query solution. 17
  • 18. SPARQL (cont) โ€ข SPARQL endpoint: โ€“ Interface that users (human or apps) can access to query an RDF data store by using SPARQL query language. โ€ข Web-based application. โ€ข Set of APIs that can be used by an agent. โ€“ Ex. Joseki Web-based SPARQL. โ€ข http://sparql.org/sparql.html 18
  • 19. SPARQL (cont) โ€ข SPARQL Query Language: โ€“ SELECT query (most frequently used). โ€“ ASK query. โ€“ DESCRIBE query. โ€“ CONSTRUCT query. 19
  • 20. SPARQL (cont) โ€ข Structure of a SELECT Query: โ€“ # base directive BASE <URI> # list of prefixes PREFIX pref: <URI> ... # result description SELECT... # graph to search FROM . . . # query pattern WHERE { ... } # query modifiers ORDER BY... 20
  • 21. SPARQL (cont) โ€ข Ex. Find all the picture formats used by Dan Brickleyโ€™s friends (from graph http://danbri.org/foaf.rdf#danbri). 21
  • 22. SPARQL (cont) โ€ข The query finds all the picture format used by Dan Bricley's friends. โ€ข Base define the source file (graph) which link is: http... โ€ข prefix define the ontology of persons foaf which link is: http... โ€ข the other prefix define the image format ontology dc which link is: http... โ€ข select * from the source graph โ€ข where is defined the term dambri in the foaf ontology throw the knows attribute and store that information in the variable ?friend โ€ข where ?friend has a description of the image throw the attribute foaf:depiction and store that information in the variable ?picture โ€ข where ?picture has the name of the image format throw attribute dc:format and store the name in the variable ?imageFormat 22
  • 24. SPARQL (cont) โ€ข Optional keyword: is needed because RDF data graph is only a semi-structured data model. โ€“ i.e. two instances of the same class type in a given RDF graph may have different set of property instances created for each one of them. โ€“ The query says, find all the people known by Dan Brickley and show their name, e-mail, and home page information if any of this information is available. 24
  • 27. SPARQL (cont) โ€ข Solution modifiers: โ€“ Distinct: eliminate duplicate solutions from the result. โ€“ Order by: โ€ข Asc (): ascending. โ€ข Desc (): descending. โ€“ Limit: set the maximum number of solutions. โ€“ Offset: sets the number of solutions to be skipped. 27
  • 28. SPARQL (cont) โ€ข Filter keyword to add value constraints, functions and operators. 28
  • 29. SPARQL (cont) โ€ข Union keyword: โ€“ A query expressed by multiple graph patterns that are mutually exclusive, and any solution will have to match exactly one of these patterns (alternative match). 29
  • 30. SPARQL (cont) โ€ข Multiple graphs: โ€“ SPARQL allows us to query any number of named graphs. 30
  • 31. SPARQL (cont) โ€ข Construct query: โ€“ Returns a new RDF graph. โ€ข Describe query: โ€“ Return an RDF graph whose statement are determined by the query processor. โ€ข Ask query: โ€“ The query processor simply returns a true or false value. 31
  • 32. SPARQL (cont) โ€ข Aggregate functions: โ€“ COUNT โ€“ SUM โ€“ MIN/MAX โ€“ AVG โ€“ GROUP_CONCAT โ€“ SAMPLE 32
  • 33. SPARQL (cont) โ€ข Other operators and functions: โ€“ NOT EXISTS โ€“ MINUS โ€“ Concat() : for expressions in a query. โ€“ INSERT DATA โ€“ DELETE DATA โ€“ CREATE [SILENT] GRAPH <uri> โ€“ DROP [SILENT] GRAPH <uri> 33
  • 34. References โ€ข Liyang Yu (2011). A Developerโ€™s Guide to the Semantic Web. Springer. ISBN: 978-3-642- 15969-5. โ€ข (2011) Huang J, Abadi D.J. and Ren K. Scalable SPARQL Querying of Large RDF Graphs. 34