SlideShare a Scribd company logo
1 of 23
SPARQL Query Forms Leigh Dodds, Oxford SWIG, March 2008 Photo Credit:  Glen Bowman
Why are there 4 SPARQL Query Forms? SPARQL  Use Cases  doesn’t help very much…
…neither does the SPARQL specification ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What are they for?
SELECT Equivalent to SQL SELECT Returns a nice, regular table
SELECT PREFIX table: <http://www.daml.org/2003/01/periodictable/PeriodicTable#> SELECT ?name ?weight WHERE { ?element table:name ?name; table:atomicWeight ?weight. } ORDER BY DESC(?weight) LIMIT 10
ASK Returns a true/false value Is there data that looks like  this ? Do you have any information about  that ?
ASK PREFIX foaf: <http://xmlns.com/foaf/0.1/> ASK WHERE { ?person a foaf:Person ; foaf:mbox <mailto:leigh@ldodds.com>. } (SPARQL equivalent of a vanity search!)
CONSTRUCT Returns an RDF graph Extract a specific subset of the queried data I want  this ,  this , and  this
CONSTRUCT PREFIX foaf: <http://xmlns.com/foaf/0.1/> CONSTRUCT { ?friend a foaf:Person; foaf:name ?name; foaf:homepage ?home. } WHERE { ?person foaf:mbox <mailto:leigh@ldodds.com>; foaf:knows ?friend. ?friend foaf:name ?name; foaf:homepage ?home. }
DESCRIBE Returns an RDF graph Tell me about  this  or  things that look like this … but you decide what’s relevant
DESCRIBE PREFIX foaf: <http://xmlns.com/foaf/0.1/> DESCRIBE ?friend  WHERE { ?person foaf:mbox “mailto:leigh@ldodds.com”; foaf:knows ?friend. }
Applied Uses Beyond the basics
DESCRIBE for Prototyping DESCRIBE <http://example.org/someResource>  Quickly assembling UIs Web APIs
SELECT for Indexing Building an ordering over some data ORDER BY, LIMIT
CONSTRUCT for Transformation … and also simple inferencing CONSTRUCT could be the XSLT of RDF Currently limited by lack of expressions in CONSTRUCT triple templates
CONSTRUCT for Transformation PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX ex: <http://www.example.org/blogger/> CONSTRUCT { ?person a ex:Blogger. } WHERE { ?person foaf:weblog ?blog. }
SPARQL for Validation XSLT can be used for XML Validation (Schematron) SPARQL can be used for RDF Validation
Validation – ASK * ASK WHERE { #triple patterns that you don’t want to find } *Source: Talis Platform  Field Predicate Map Validation
Validation – CONSTRUCT * CONSTRUCT { #some error message or data } WHERE { #triple patterns that you don’t want to find } *Source: Alistair Miles,  Schemarama  2 Jena 2 Validation Support
In Combination?
The ADC Pattern ASK – DESCRIBE – CONSTRUCT  Probe endpoint Grab default view of data Refine data extraction and/or apply transformation
Questions?

More Related Content

What's hot

dotNetRDF - A Semantic Web/RDF Library for .Net Developers
dotNetRDF - A Semantic Web/RDF Library for .Net DevelopersdotNetRDF - A Semantic Web/RDF Library for .Net Developers
dotNetRDF - A Semantic Web/RDF Library for .Net DevelopersRob Vesse
 
Facet: Building Web Pages with SPARQL
Facet: Building Web Pages with SPARQLFacet: Building Web Pages with SPARQL
Facet: Building Web Pages with SPARQLLeigh Dodds
 
20080917 Rev
20080917 Rev20080917 Rev
20080917 Revcharper
 
An Introduction to the Open Archives Initiative Object Reuse and Exchange (OA...
An Introduction to the Open Archives Initiative Object Reuse and Exchange (OA...An Introduction to the Open Archives Initiative Object Reuse and Exchange (OA...
An Introduction to the Open Archives Initiative Object Reuse and Exchange (OA...Jenn Riley
 
Hadoop Frameworks Panel__HadoopSummit2010
Hadoop Frameworks Panel__HadoopSummit2010Hadoop Frameworks Panel__HadoopSummit2010
Hadoop Frameworks Panel__HadoopSummit2010Yahoo Developer Network
 
Grails And The Semantic Web
Grails And The Semantic WebGrails And The Semantic Web
Grails And The Semantic Webwilliam_greenly
 
Clustering Search to Navigate A Case Study of the Canadian World Wide Web as ...
Clustering Search to Navigate A Case Study of the Canadian World Wide Web as ...Clustering Search to Navigate A Case Study of the Canadian World Wide Web as ...
Clustering Search to Navigate A Case Study of the Canadian World Wide Web as ...Ian Milligan
 
Sustainable queryable access to Linked Data
Sustainable queryable access to Linked DataSustainable queryable access to Linked Data
Sustainable queryable access to Linked DataRuben Verborgh
 
Harnessing The Semantic Web
Harnessing The Semantic WebHarnessing The Semantic Web
Harnessing The Semantic Webwilliam_greenly
 
Querying data on the Web – client or server?
Querying data on the Web – client or server?Querying data on the Web – client or server?
Querying data on the Web – client or server?Ruben Verborgh
 
Rapid Digitization of Latin American Ephemera with Hydra
Rapid Digitization of Latin American Ephemera with HydraRapid Digitization of Latin American Ephemera with Hydra
Rapid Digitization of Latin American Ephemera with HydraJon Stroop
 
Building RESTful Applications with OData
Building RESTful Applications with ODataBuilding RESTful Applications with OData
Building RESTful Applications with ODataTodd Anglin
 
Cornell20080516
Cornell20080516Cornell20080516
Cornell20080516charper
 

What's hot (20)

Sparql
SparqlSparql
Sparql
 
dotNetRDF - A Semantic Web/RDF Library for .Net Developers
dotNetRDF - A Semantic Web/RDF Library for .Net DevelopersdotNetRDF - A Semantic Web/RDF Library for .Net Developers
dotNetRDF - A Semantic Web/RDF Library for .Net Developers
 
Introduction to dotNetRDF
Introduction to dotNetRDFIntroduction to dotNetRDF
Introduction to dotNetRDF
 
Facet: Building Web Pages with SPARQL
Facet: Building Web Pages with SPARQLFacet: Building Web Pages with SPARQL
Facet: Building Web Pages with SPARQL
 
20080917 Rev
20080917 Rev20080917 Rev
20080917 Rev
 
An Introduction to the Open Archives Initiative Object Reuse and Exchange (OA...
An Introduction to the Open Archives Initiative Object Reuse and Exchange (OA...An Introduction to the Open Archives Initiative Object Reuse and Exchange (OA...
An Introduction to the Open Archives Initiative Object Reuse and Exchange (OA...
 
Tutorial Linked APIs
Tutorial Linked APIsTutorial Linked APIs
Tutorial Linked APIs
 
Linked Data Fragments
Linked Data FragmentsLinked Data Fragments
Linked Data Fragments
 
Hadoop Frameworks Panel__HadoopSummit2010
Hadoop Frameworks Panel__HadoopSummit2010Hadoop Frameworks Panel__HadoopSummit2010
Hadoop Frameworks Panel__HadoopSummit2010
 
RDFa Tutorial
RDFa TutorialRDFa Tutorial
RDFa Tutorial
 
Grails And The Semantic Web
Grails And The Semantic WebGrails And The Semantic Web
Grails And The Semantic Web
 
Clustering Search to Navigate A Case Study of the Canadian World Wide Web as ...
Clustering Search to Navigate A Case Study of the Canadian World Wide Web as ...Clustering Search to Navigate A Case Study of the Canadian World Wide Web as ...
Clustering Search to Navigate A Case Study of the Canadian World Wide Web as ...
 
Sustainable queryable access to Linked Data
Sustainable queryable access to Linked DataSustainable queryable access to Linked Data
Sustainable queryable access to Linked Data
 
Harnessing The Semantic Web
Harnessing The Semantic WebHarnessing The Semantic Web
Harnessing The Semantic Web
 
Querying data on the Web – client or server?
Querying data on the Web – client or server?Querying data on the Web – client or server?
Querying data on the Web – client or server?
 
Web of Data Usage Mining
Web of Data Usage MiningWeb of Data Usage Mining
Web of Data Usage Mining
 
Rapid Digitization of Latin American Ephemera with Hydra
Rapid Digitization of Latin American Ephemera with HydraRapid Digitization of Latin American Ephemera with Hydra
Rapid Digitization of Latin American Ephemera with Hydra
 
Building RESTful Applications with OData
Building RESTful Applications with ODataBuilding RESTful Applications with OData
Building RESTful Applications with OData
 
Cornell20080516
Cornell20080516Cornell20080516
Cornell20080516
 
469 talk
469 talk469 talk
469 talk
 

Similar to SPARQL Query Forms

Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialAdonisDamian
 
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
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLMyungjin Lee
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsDr. Neil Brittliff
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQLLino Valdivia
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011Robert Engels
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011sesam4able
 
What;s Coming In SPARQL2?
What;s Coming In SPARQL2?What;s Coming In SPARQL2?
What;s Coming In SPARQL2?LeeFeigenbaum
 
Creating APIs over RDF
Creating APIs over RDFCreating APIs over RDF
Creating APIs over RDFLeigh Dodds
 
Creating APIs over RDF
Creating APIs over RDFCreating APIs over RDF
Creating APIs over RDFLeigh Dodds
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Serverwebhostingguy
 
Uplift – Generating RDF datasets from non-RDF data with R2RML
Uplift – Generating RDF datasets from non-RDF data with R2RMLUplift – Generating RDF datasets from non-RDF data with R2RML
Uplift – Generating RDF datasets from non-RDF data with R2RMLChristophe Debruyne
 
SPARQLing Services
SPARQLing ServicesSPARQLing Services
SPARQLing ServicesLeigh Dodds
 
Porting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQLPorting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQLPeter Eisentraut
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQLPedro Szekely
 
2008 11 13 Hcls Call
2008 11 13 Hcls Call2008 11 13 Hcls Call
2008 11 13 Hcls CallJun Zhao
 
Introduction to metadata cleansing using SPARQL update queries
Introduction to metadata cleansing using SPARQL update queriesIntroduction to metadata cleansing using SPARQL update queries
Introduction to metadata cleansing using SPARQL update queriesEuropean Commission
 
Sparql a simple knowledge query
Sparql  a simple knowledge querySparql  a simple knowledge query
Sparql a simple knowledge queryStanley Wang
 

Similar to SPARQL Query Forms (20)

Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorial
 
Querying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLQuerying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQL
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQL
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your Analytics
 
SPARQL 1.1 Status
SPARQL 1.1 StatusSPARQL 1.1 Status
SPARQL 1.1 Status
 
AnzoGraph DB - SPARQL 101
AnzoGraph DB - SPARQL 101AnzoGraph DB - SPARQL 101
AnzoGraph DB - SPARQL 101
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQL
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011
 
What;s Coming In SPARQL2?
What;s Coming In SPARQL2?What;s Coming In SPARQL2?
What;s Coming In SPARQL2?
 
Creating APIs over RDF
Creating APIs over RDFCreating APIs over RDF
Creating APIs over RDF
 
Creating APIs over RDF
Creating APIs over RDFCreating APIs over RDF
Creating APIs over RDF
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Server
 
Uplift – Generating RDF datasets from non-RDF data with R2RML
Uplift – Generating RDF datasets from non-RDF data with R2RMLUplift – Generating RDF datasets from non-RDF data with R2RML
Uplift – Generating RDF datasets from non-RDF data with R2RML
 
SPARQLing Services
SPARQLing ServicesSPARQLing Services
SPARQLing Services
 
Porting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQLPorting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQL
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
2008 11 13 Hcls Call
2008 11 13 Hcls Call2008 11 13 Hcls Call
2008 11 13 Hcls Call
 
Introduction to metadata cleansing using SPARQL update queries
Introduction to metadata cleansing using SPARQL update queriesIntroduction to metadata cleansing using SPARQL update queries
Introduction to metadata cleansing using SPARQL update queries
 
Sparql a simple knowledge query
Sparql  a simple knowledge querySparql  a simple knowledge query
Sparql a simple knowledge query
 

More from Leigh Dodds

Being a data magpie
Being a data magpieBeing a data magpie
Being a data magpieLeigh Dodds
 
How you (yes, you!) can contribute to open data
How you (yes, you!) can contribute to open dataHow you (yes, you!) can contribute to open data
How you (yes, you!) can contribute to open dataLeigh Dodds
 
Accessible Bath Training
Accessible Bath TrainingAccessible Bath Training
Accessible Bath TrainingLeigh Dodds
 
Cheap bots done quick lightning talk
Cheap bots done quick lightning talkCheap bots done quick lightning talk
Cheap bots done quick lightning talkLeigh Dodds
 
Open data in bath
Open data in bathOpen data in bath
Open data in bathLeigh Dodds
 
Bath: Hacked Learning Night: Introduction to CartoDB
Bath: Hacked Learning Night: Introduction to CartoDBBath: Hacked Learning Night: Introduction to CartoDB
Bath: Hacked Learning Night: Introduction to CartoDBLeigh Dodds
 
Dungeons and Dragons and Data
Dungeons and Dragons and DataDungeons and Dragons and Data
Dungeons and Dragons and DataLeigh Dodds
 
Love the Environment Pre-Meetup
Love the Environment Pre-MeetupLove the Environment Pre-Meetup
Love the Environment Pre-MeetupLeigh Dodds
 
Why I love open data and you should too
Why I love open data and you should tooWhy I love open data and you should too
Why I love open data and you should tooLeigh Dodds
 
Introduction to Open Data & Bath: Hacked
Introduction to Open Data & Bath: HackedIntroduction to Open Data & Bath: Hacked
Introduction to Open Data & Bath: HackedLeigh Dodds
 
Bath: Hacked: open data, the arts and cultural heritage
Bath: Hacked: open data, the arts and cultural heritageBath: Hacked: open data, the arts and cultural heritage
Bath: Hacked: open data, the arts and cultural heritageLeigh Dodds
 
Introduction to Open Data & Linked Data
Introduction to Open Data & Linked DataIntroduction to Open Data & Linked Data
Introduction to Open Data & Linked DataLeigh Dodds
 
Time Travelling with Open Data
Time Travelling with Open DataTime Travelling with Open Data
Time Travelling with Open DataLeigh Dodds
 
Ignite for Good: Why I Love Open Data and You Should Too
Ignite for Good: Why I Love Open Data and You Should TooIgnite for Good: Why I Love Open Data and You Should Too
Ignite for Good: Why I Love Open Data and You Should TooLeigh Dodds
 
Oil and Water: When Data Licences Don't Mix
Oil and Water: When Data Licences Don't MixOil and Water: When Data Licences Don't Mix
Oil and Water: When Data Licences Don't MixLeigh Dodds
 
Linked Data Patterns
Linked Data PatternsLinked Data Patterns
Linked Data PatternsLeigh Dodds
 
Digital Grafitti for Digital Cities
Digital Grafitti for Digital CitiesDigital Grafitti for Digital Cities
Digital Grafitti for Digital CitiesLeigh Dodds
 
Layered Data: An Example
Layered Data: An ExampleLayered Data: An Example
Layered Data: An ExampleLeigh Dodds
 
Data Foundations for Digital Cities
Data Foundations for Digital CitiesData Foundations for Digital Cities
Data Foundations for Digital CitiesLeigh Dodds
 

More from Leigh Dodds (20)

Being a data magpie
Being a data magpieBeing a data magpie
Being a data magpie
 
How you (yes, you!) can contribute to open data
How you (yes, you!) can contribute to open dataHow you (yes, you!) can contribute to open data
How you (yes, you!) can contribute to open data
 
Accessible Bath Training
Accessible Bath TrainingAccessible Bath Training
Accessible Bath Training
 
Accessible Bath
Accessible BathAccessible Bath
Accessible Bath
 
Cheap bots done quick lightning talk
Cheap bots done quick lightning talkCheap bots done quick lightning talk
Cheap bots done quick lightning talk
 
Open data in bath
Open data in bathOpen data in bath
Open data in bath
 
Bath: Hacked Learning Night: Introduction to CartoDB
Bath: Hacked Learning Night: Introduction to CartoDBBath: Hacked Learning Night: Introduction to CartoDB
Bath: Hacked Learning Night: Introduction to CartoDB
 
Dungeons and Dragons and Data
Dungeons and Dragons and DataDungeons and Dragons and Data
Dungeons and Dragons and Data
 
Love the Environment Pre-Meetup
Love the Environment Pre-MeetupLove the Environment Pre-Meetup
Love the Environment Pre-Meetup
 
Why I love open data and you should too
Why I love open data and you should tooWhy I love open data and you should too
Why I love open data and you should too
 
Introduction to Open Data & Bath: Hacked
Introduction to Open Data & Bath: HackedIntroduction to Open Data & Bath: Hacked
Introduction to Open Data & Bath: Hacked
 
Bath: Hacked: open data, the arts and cultural heritage
Bath: Hacked: open data, the arts and cultural heritageBath: Hacked: open data, the arts and cultural heritage
Bath: Hacked: open data, the arts and cultural heritage
 
Introduction to Open Data & Linked Data
Introduction to Open Data & Linked DataIntroduction to Open Data & Linked Data
Introduction to Open Data & Linked Data
 
Time Travelling with Open Data
Time Travelling with Open DataTime Travelling with Open Data
Time Travelling with Open Data
 
Ignite for Good: Why I Love Open Data and You Should Too
Ignite for Good: Why I Love Open Data and You Should TooIgnite for Good: Why I Love Open Data and You Should Too
Ignite for Good: Why I Love Open Data and You Should Too
 
Oil and Water: When Data Licences Don't Mix
Oil and Water: When Data Licences Don't MixOil and Water: When Data Licences Don't Mix
Oil and Water: When Data Licences Don't Mix
 
Linked Data Patterns
Linked Data PatternsLinked Data Patterns
Linked Data Patterns
 
Digital Grafitti for Digital Cities
Digital Grafitti for Digital CitiesDigital Grafitti for Digital Cities
Digital Grafitti for Digital Cities
 
Layered Data: An Example
Layered Data: An ExampleLayered Data: An Example
Layered Data: An Example
 
Data Foundations for Digital Cities
Data Foundations for Digital CitiesData Foundations for Digital Cities
Data Foundations for Digital Cities
 

Recently uploaded

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

SPARQL Query Forms

  • 1. SPARQL Query Forms Leigh Dodds, Oxford SWIG, March 2008 Photo Credit: Glen Bowman
  • 2. Why are there 4 SPARQL Query Forms? SPARQL Use Cases doesn’t help very much…
  • 3.
  • 5. SELECT Equivalent to SQL SELECT Returns a nice, regular table
  • 6. SELECT PREFIX table: <http://www.daml.org/2003/01/periodictable/PeriodicTable#> SELECT ?name ?weight WHERE { ?element table:name ?name; table:atomicWeight ?weight. } ORDER BY DESC(?weight) LIMIT 10
  • 7. ASK Returns a true/false value Is there data that looks like this ? Do you have any information about that ?
  • 8. ASK PREFIX foaf: <http://xmlns.com/foaf/0.1/> ASK WHERE { ?person a foaf:Person ; foaf:mbox <mailto:leigh@ldodds.com>. } (SPARQL equivalent of a vanity search!)
  • 9. CONSTRUCT Returns an RDF graph Extract a specific subset of the queried data I want this , this , and this
  • 10. CONSTRUCT PREFIX foaf: <http://xmlns.com/foaf/0.1/> CONSTRUCT { ?friend a foaf:Person; foaf:name ?name; foaf:homepage ?home. } WHERE { ?person foaf:mbox <mailto:leigh@ldodds.com>; foaf:knows ?friend. ?friend foaf:name ?name; foaf:homepage ?home. }
  • 11. DESCRIBE Returns an RDF graph Tell me about this or things that look like this … but you decide what’s relevant
  • 12. DESCRIBE PREFIX foaf: <http://xmlns.com/foaf/0.1/> DESCRIBE ?friend WHERE { ?person foaf:mbox “mailto:leigh@ldodds.com”; foaf:knows ?friend. }
  • 13. Applied Uses Beyond the basics
  • 14. DESCRIBE for Prototyping DESCRIBE <http://example.org/someResource> Quickly assembling UIs Web APIs
  • 15. SELECT for Indexing Building an ordering over some data ORDER BY, LIMIT
  • 16. CONSTRUCT for Transformation … and also simple inferencing CONSTRUCT could be the XSLT of RDF Currently limited by lack of expressions in CONSTRUCT triple templates
  • 17. CONSTRUCT for Transformation PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX ex: <http://www.example.org/blogger/> CONSTRUCT { ?person a ex:Blogger. } WHERE { ?person foaf:weblog ?blog. }
  • 18. SPARQL for Validation XSLT can be used for XML Validation (Schematron) SPARQL can be used for RDF Validation
  • 19. Validation – ASK * ASK WHERE { #triple patterns that you don’t want to find } *Source: Talis Platform Field Predicate Map Validation
  • 20. Validation – CONSTRUCT * CONSTRUCT { #some error message or data } WHERE { #triple patterns that you don’t want to find } *Source: Alistair Miles, Schemarama 2 Jena 2 Validation Support
  • 22. The ADC Pattern ASK – DESCRIBE – CONSTRUCT Probe endpoint Grab default view of data Refine data extraction and/or apply transformation