SlideShare a Scribd company logo
SPARQL : A Simple Knowledge Query
STANLEY WANG
SOLUTION ARCHITECT, TECH LEAD
@SWANG68
http://www.linkedin.com/in/stanley-wang-a2b143b
Querying RDF data
• RDF is a directed, labeled graph data format for representing
the first layer information in semantic web standards;
• Query patterns are like RDF triples except that each of the
subject, predicate and object may be a variable;
SPARQL
• W3C standard recommendation in Q3 2007
• A query language based on graph patterns
• Protocol layer for using SPARQL over HTTP
• SPARQL endpoints on the Web
• SPARQL used to construct graphs
SPARQL stands for Protocol
and RDF Query Language
3
SPARQL as a Unifying Source
SPARQL in 3 Parts
1. Query Language
2. Result Format
3. Access Protocol
SPARQL Query
SELECT ...
FROM ...
WHERE { ... }
SELECT clause to identify the values to
be returned
FROM clause to identify the data
sources to query
WHERE clause the triple/graph pattern to be matched
against the triples/graphs of RDF
a conjunction of triples:
{ ?x rdf:type ex:Person
?x ex:name ?name }
PREFIX
declare the schema used
in the query
Example Persons and their Names
5
PREFIX ex: <http://inria.fr/schema#>
SELECT ?person ?name
WHERE {
?person rdf:type ex:Person
?person ex:name ?name .
}
6
<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#" >
<head>
<variable name="person"/>
<variable name="name"/>
</head>
<results ordered="false" distinct="false">
<result>
<binding name="person">
<uri>http://inria.fr/schema#fg</uri>
</binding>
<binding name="name">
<literal>gandon</literal>
</binding>
</result>
<result> ...
 with HTTP Binding
GET /sparql/?query=<encoded query> HTTP/1.1
Host: www.inria.fr
User-agent: my-sparql-client/0.1
SPARQL Protocol
• Sending Queries and their Results Across the Web
 with SOAP Binding
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<query-request xmlns="http://www.w3.org/2005/09/sparql-
protocol-types/#">
<query>SELECT ?x ?p ?y WHERE {?x ?p ?y}</query>
</query-request>
</soapenv:Body>
</soapenv:Envelope>
• We need to associate a number of factors, including
hospital type and facilities – its accessibility after a
disaster – and the staff available
• The query needs to be structured based on Concepts &
Relationships that can be retrieved and then customized
for the specific query.
• Using this approach, a listing of the hospitals capable of
dealing with large number of burn cases is returned to
the user and information associated with the query
retrieved.
A “Simple” Knowledge Query
Which hospitals within 30 mins of Alpine, CA
provide burn treatment?”

More Related Content

What's hot (20)

PDF
Annotating Scholarly Works - the W3C Open Annotation Model
Robert Sanderson
 
PPTX
Linked data HHS 2015
Cason Snow
 
PDF
Annotations as Linked Data with Fedora4 and Triannon
Robert Sanderson
 
PPTX
Using OWL for the RESO Data Dictionary
Chimezie Ogbuji
 
PPTX
April 8 NISO Webinar: Experimenting with BIBFRAME: Reports from Early Adopters
National Information Standards Organization (NISO)
 
PDF
EC-WEB: Validator and Preview for the JobPosting Data Model of Schema.org
Jindřich Mynarz
 
PPT
SemanticWeb Nuts 'n Bolts
Rinke Hoekstra
 
PPTX
Deriving an Emergent Relational Schema from RDF Data
Graph-TA
 
PPTX
RDF Graph Data Management in Oracle Database and NoSQL Platforms
Graph-TA
 
PPTX
What's New in RDF 1.1?
Richard Cyganiak
 
PPTX
Linked Data for Czech Legislation
Martin Necasky
 
PPT
Freire model api
The European Library
 
PPTX
Infromation Reprentation, Structured Data and Semantics
Yogendra Tamang
 
PPTX
Semantic Application for Healthcare
scholten
 
PDF
Linked Open Data
Laura Hollink
 
PDF
Managing RDF data with graph databases
Graph-TA
 
PPT
Analysis on semantic web layer cake entities
తేజ దండిభట్ల
 
PDF
2010 06 rdf_next
Jun Zhao
 
PPTX
Semantic Data Normalization For Efficient Clinical Trial Research
Ontotext
 
PDF
Yosemite part-4 webinar-final
DATAVERSITY
 
Annotating Scholarly Works - the W3C Open Annotation Model
Robert Sanderson
 
Linked data HHS 2015
Cason Snow
 
Annotations as Linked Data with Fedora4 and Triannon
Robert Sanderson
 
Using OWL for the RESO Data Dictionary
Chimezie Ogbuji
 
April 8 NISO Webinar: Experimenting with BIBFRAME: Reports from Early Adopters
National Information Standards Organization (NISO)
 
EC-WEB: Validator and Preview for the JobPosting Data Model of Schema.org
Jindřich Mynarz
 
SemanticWeb Nuts 'n Bolts
Rinke Hoekstra
 
Deriving an Emergent Relational Schema from RDF Data
Graph-TA
 
RDF Graph Data Management in Oracle Database and NoSQL Platforms
Graph-TA
 
What's New in RDF 1.1?
Richard Cyganiak
 
Linked Data for Czech Legislation
Martin Necasky
 
Freire model api
The European Library
 
Infromation Reprentation, Structured Data and Semantics
Yogendra Tamang
 
Semantic Application for Healthcare
scholten
 
Linked Open Data
Laura Hollink
 
Managing RDF data with graph databases
Graph-TA
 
Analysis on semantic web layer cake entities
తేజ దండిభట్ల
 
2010 06 rdf_next
Jun Zhao
 
Semantic Data Normalization For Efficient Clinical Trial Research
Ontotext
 
Yosemite part-4 webinar-final
DATAVERSITY
 

Similar to Sparql a simple knowledge query (20)

PPTX
The Semantic Web #10 - SPARQL
Myungjin Lee
 
PPTX
Semantic web meetup – sparql tutorial
AdonisDamian
 
KEY
RDFa Introductory Course Session 2/4 How RDFa
Platypus
 
KEY
How RDFa works
JISC Netskills
 
ODP
Semantic Web introduction
Graphity
 
ODP
SPARQLing Services
Leigh Dodds
 
PPTX
SWT Lecture Session 4 - SW architectures and SPARQL
Mariano Rodriguez-Muro
 
PPTX
4 sw architectures and sparql
Mariano Rodriguez-Muro
 
PPT
Querying the Semantic Web with SPARQL
Emanuele Della Valle
 
ODP
Creating APIs over RDF
Leigh Dodds
 
ODP
Creating APIs over RDF
Leigh Dodds
 
PDF
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
Josef Petrák
 
PPT
Sparql
Serge Garlatti
 
PDF
Sparql service-description
STIinnsbruck
 
PPT
From SQL to SPARQL
George Roth
 
PDF
Semantic Web(Web 3.0) SPARQL
Daniel D.J. UM
 
PDF
03 form-data
snopteck
 
PPTX
balloon Fusion: SPARQL Rewriting Based on Unified Co-Reference Information
Kai Schlegel
 
ODP
NoSQL and Triple Stores
andyseaborne
 
PPTX
SPARQL-DL - Theory & Practice
Adriel Café
 
The Semantic Web #10 - SPARQL
Myungjin Lee
 
Semantic web meetup – sparql tutorial
AdonisDamian
 
RDFa Introductory Course Session 2/4 How RDFa
Platypus
 
How RDFa works
JISC Netskills
 
Semantic Web introduction
Graphity
 
SPARQLing Services
Leigh Dodds
 
SWT Lecture Session 4 - SW architectures and SPARQL
Mariano Rodriguez-Muro
 
4 sw architectures and sparql
Mariano Rodriguez-Muro
 
Querying the Semantic Web with SPARQL
Emanuele Della Valle
 
Creating APIs over RDF
Leigh Dodds
 
Creating APIs over RDF
Leigh Dodds
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
Josef Petrák
 
Sparql service-description
STIinnsbruck
 
From SQL to SPARQL
George Roth
 
Semantic Web(Web 3.0) SPARQL
Daniel D.J. UM
 
03 form-data
snopteck
 
balloon Fusion: SPARQL Rewriting Based on Unified Co-Reference Information
Kai Schlegel
 
NoSQL and Triple Stores
andyseaborne
 
SPARQL-DL - Theory & Practice
Adriel Café
 
Ad

More from Stanley Wang (13)

PDF
Ontology model and owl
Stanley Wang
 
PDF
Semantic web technology
Stanley Wang
 
PDF
Next generation big data bi
Stanley Wang
 
PDF
Overview of recommender system
Stanley Wang
 
PDF
Data analytics as a service
Stanley Wang
 
PDF
Distributed machine learning examples
Stanley Wang
 
PDF
Distributed machine learning
Stanley Wang
 
PDF
Fundamental of deep learning
Stanley Wang
 
PDF
Graph analytic and machine learning
Stanley Wang
 
PDF
Big data analytic market opportunity
Stanley Wang
 
PDF
A sdn based application aware and network provisioning
Stanley Wang
 
PDF
Hadoop ecosystem
Stanley Wang
 
PDF
Hadoop ecosystem
Stanley Wang
 
Ontology model and owl
Stanley Wang
 
Semantic web technology
Stanley Wang
 
Next generation big data bi
Stanley Wang
 
Overview of recommender system
Stanley Wang
 
Data analytics as a service
Stanley Wang
 
Distributed machine learning examples
Stanley Wang
 
Distributed machine learning
Stanley Wang
 
Fundamental of deep learning
Stanley Wang
 
Graph analytic and machine learning
Stanley Wang
 
Big data analytic market opportunity
Stanley Wang
 
A sdn based application aware and network provisioning
Stanley Wang
 
Hadoop ecosystem
Stanley Wang
 
Hadoop ecosystem
Stanley Wang
 
Ad

Recently uploaded (20)

PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
July Patch Tuesday
Ivanti
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 

Sparql a simple knowledge query

  • 1. SPARQL : A Simple Knowledge Query STANLEY WANG SOLUTION ARCHITECT, TECH LEAD @SWANG68 http://www.linkedin.com/in/stanley-wang-a2b143b
  • 2. Querying RDF data • RDF is a directed, labeled graph data format for representing the first layer information in semantic web standards; • Query patterns are like RDF triples except that each of the subject, predicate and object may be a variable; SPARQL • W3C standard recommendation in Q3 2007 • A query language based on graph patterns • Protocol layer for using SPARQL over HTTP • SPARQL endpoints on the Web • SPARQL used to construct graphs SPARQL stands for Protocol and RDF Query Language
  • 3. 3 SPARQL as a Unifying Source SPARQL in 3 Parts 1. Query Language 2. Result Format 3. Access Protocol
  • 4. SPARQL Query SELECT ... FROM ... WHERE { ... } SELECT clause to identify the values to be returned FROM clause to identify the data sources to query WHERE clause the triple/graph pattern to be matched against the triples/graphs of RDF a conjunction of triples: { ?x rdf:type ex:Person ?x ex:name ?name } PREFIX declare the schema used in the query
  • 5. Example Persons and their Names 5 PREFIX ex: <http://inria.fr/schema#> SELECT ?person ?name WHERE { ?person rdf:type ex:Person ?person ex:name ?name . }
  • 6. 6 <?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#" > <head> <variable name="person"/> <variable name="name"/> </head> <results ordered="false" distinct="false"> <result> <binding name="person"> <uri>http://inria.fr/schema#fg</uri> </binding> <binding name="name"> <literal>gandon</literal> </binding> </result> <result> ...
  • 7.  with HTTP Binding GET /sparql/?query=<encoded query> HTTP/1.1 Host: www.inria.fr User-agent: my-sparql-client/0.1 SPARQL Protocol • Sending Queries and their Results Across the Web  with SOAP Binding <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <query-request xmlns="http://www.w3.org/2005/09/sparql- protocol-types/#"> <query>SELECT ?x ?p ?y WHERE {?x ?p ?y}</query> </query-request> </soapenv:Body> </soapenv:Envelope>
  • 8. • We need to associate a number of factors, including hospital type and facilities – its accessibility after a disaster – and the staff available • The query needs to be structured based on Concepts & Relationships that can be retrieved and then customized for the specific query. • Using this approach, a listing of the hospitals capable of dealing with large number of burn cases is returned to the user and information associated with the query retrieved. A “Simple” Knowledge Query Which hospitals within 30 mins of Alpine, CA provide burn treatment?”