SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 
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
 
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
 

Tendances (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
 

En vedette

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
 
El solstice coupé. antonio horacio stiuso
El solstice coupé. antonio horacio stiusoEl solstice coupé. antonio horacio stiuso
El solstice coupé. antonio horacio stiusoAntonioCabrala
 
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
 

En vedette (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
 

Similaire à 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
 
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
 
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
 
ontology.ppt
ontology.pptontology.ppt
ontology.pptPrerak10
 

Similaire à 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
 

Dernier

Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsPriya Reddy
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsMonica Sydney
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查ydyuyu
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsMonica Sydney
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理F
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasDigicorns Technologies
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdfMatthew Sinclair
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Balliameghakumariji156
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...kumargunjan9515
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 

Dernier (20)

Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 

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