SlideShare a Scribd company logo
1 of 13
Download to read offline
Tech Talk
BIBFRAMEWorking Group
15 March 2016
Notes from the Library Juice Academy courses on
“SPARQL Fundamentals”
Allison Jai O’Dell | AJODELL@ufl.edu
SPARQL
The SPARQL Protocol and RDF Query Language (SPARQL) is “a semantic query
language for databases, able to retrieve and manipulate data stored in Resource
Description Framework (RDF) format” --Wikipedia
Turtle Syntax
SPARQL uses the triple pattern and Turtle syntax
Turtle: Terse RDF Triple Language
<http://www.example.com/uri> namespace:element “literal” .
“literal”@en  Literal with a language tag
“literal”^^xsd:integer  Typed literal
Basic SPARQL Query
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?subject
WHERE
{
<http://www.worldcat.org/oclc/704257552> dct:creator ?subject .
}
PREFIX specifies namespaces
SELECT specifies solutions to return
WHERE specifies triple & graph patterns to query
DISTINCT Modifier
PREFIX dct: <http://purl.org/dc/terms/>
SELECT DISTINCT ?subject
WHERE
{
?title dct:subject ?subject .
}
DISTINCT de-duplicates solutions
More Modifiers
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?title ?subject
WHERE { ?title dct:subject ?subject . }
ORDER BY ?subject
LIMIT 5
OFFSET 10
ORDER BY specifies how to sort solutions.
OFFSET causes the solutions generated to start after the specified
number of solutions.
LIMIT puts an upper bound on the number of solutions returned.
Federated Queries
PREFIX dct: <http://purl.org/dc/terms/>
SELECT DISTINCT ?subject
WHERE
{
SERVICE <http://dbpedia.org/snorql>
{
?title dct:subject ?subject .
}
}
SERVICE lets you run federated queries over multiple endpoints
Helpful Operators
• Conjunction / Boolean “and”
A . B
• Disjunction / Boolean “or”
{A} UNION {B}
• Negation
A MINUS {B}
Property Paths
• path1/path2 Sequence path (pipe)
• ^path1 Inverse path (object to subject)
• path1|path2 Alternative path (either path1 or path2)
• path1* path1 repeated zero or more times
• path1+ path1 repeated one or more times
• path1? Zero or one, e.g., path1 is optional
• !(set) Negation
Slightly complicated SPARQL Query
# British Museum http://collection.britishmuseum.org/sparql
PREFIX crm: <http://erlangen-crm.org/current/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ecrm: <http://erlangen-crm.org/current/>
PREFIX bmo: <http://collection.britishmuseum.org/id/ontology/>
SELECT ?physdesc
{
?henry skos:prefLabel "Henry Spencer Ashbee" .
?henry ^ecrm:P51_has_former_or_current_owner/
bmo:PX_physical_description ?physdesc .
}
Four Query Forms
• SELECT
• CONSTRUCT
Construct new RDF triples & graphs based on patterns and existing data
• ASK
Ask whether or not a pattern matches the data; result is true or false
• DESCRIBE
Describe the resources matched by given variables
CONSTRUCT Query
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CONSTRUCT
{
dbr:Mindy_Kaling foaf:knows ?who .
?who foaf:knows ?more .
}
WHERE
{
SERVICE <http://dbpedia.org/sparql>
{
dbr:The_Mindy_Project dbo:starring ?who .
?who ^dbo:starring/dbo:starring ?more .
}
}
Let’s have a go.
http://dbpedia.org/snorql/
http://collection.britishmuseum.org/sparql

More Related Content

What's hot

Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphsandyseaborne
 
Intro to OWL & Ontology
Intro to OWL & OntologyIntro to OWL & Ontology
Intro to OWL & OntologyNarni Rajesh
 
VALA Tech Camp 2017: Intro to Wikidata & SPARQL
VALA Tech Camp 2017: Intro to Wikidata & SPARQLVALA Tech Camp 2017: Intro to Wikidata & SPARQL
VALA Tech Camp 2017: Intro to Wikidata & SPARQLJane Frazier
 
Achieving time effective federated information from scalable rdf data using s...
Achieving time effective federated information from scalable rdf data using s...Achieving time effective federated information from scalable rdf data using s...
Achieving time effective federated information from scalable rdf data using s...తేజ దండిభట్ల
 
FedX - Optimization Techniques for Federated Query Processing on Linked Data
FedX - Optimization Techniques for Federated Query Processing on Linked DataFedX - Optimization Techniques for Federated Query Processing on Linked Data
FedX - Optimization Techniques for Federated Query Processing on Linked Dataaschwarte
 
Dependent types (and other ideas for guaranteeing correctness with types)
Dependent types (and other ideas for guaranteeing correctness with types)Dependent types (and other ideas for guaranteeing correctness with types)
Dependent types (and other ideas for guaranteeing correctness with types)radexp
 
Semantic Pipes and Semantic Mashups
Semantic Pipes and Semantic MashupsSemantic Pipes and Semantic Mashups
Semantic Pipes and Semantic Mashupsgiurca
 
The WorldCat Search API
The WorldCat Search APIThe WorldCat Search API
The WorldCat Search APIOCLC Research
 
2008 11 13 Hcls Call
2008 11 13 Hcls Call2008 11 13 Hcls Call
2008 11 13 Hcls CallJun Zhao
 
Resource description framework
Resource description frameworkResource description framework
Resource description frameworkhozifa1010
 
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
 
Mapping Hierarchical Sources into RDF using the RML Mapping Language
Mapping Hierarchical Sources into RDF using the RML Mapping LanguageMapping Hierarchical Sources into RDF using the RML Mapping Language
Mapping Hierarchical Sources into RDF using the RML Mapping Languageandimou
 
From Ontology to Wiki: Automating Generation of Semantic Wiki Interfaces from...
From Ontology to Wiki: Automating Generation of Semantic Wiki Interfaces from...From Ontology to Wiki: Automating Generation of Semantic Wiki Interfaces from...
From Ontology to Wiki: Automating Generation of Semantic Wiki Interfaces from...Open University in the Netherlands
 
Session 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing BasicsSession 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing BasicsPawanMM
 
Semantic web for ontology chapter4 bynk
Semantic web for ontology chapter4 bynkSemantic web for ontology chapter4 bynk
Semantic web for ontology chapter4 bynkNamgee Lee
 

What's hot (20)

Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
 
BioSD Tutorial 2014 Editition
BioSD Tutorial 2014 EdititionBioSD Tutorial 2014 Editition
BioSD Tutorial 2014 Editition
 
From ontology to wiki
From ontology to wikiFrom ontology to wiki
From ontology to wiki
 
Intro to OWL & Ontology
Intro to OWL & OntologyIntro to OWL & Ontology
Intro to OWL & Ontology
 
VALA Tech Camp 2017: Intro to Wikidata & SPARQL
VALA Tech Camp 2017: Intro to Wikidata & SPARQLVALA Tech Camp 2017: Intro to Wikidata & SPARQL
VALA Tech Camp 2017: Intro to Wikidata & SPARQL
 
Achieving time effective federated information from scalable rdf data using s...
Achieving time effective federated information from scalable rdf data using s...Achieving time effective federated information from scalable rdf data using s...
Achieving time effective federated information from scalable rdf data using s...
 
FedX - Optimization Techniques for Federated Query Processing on Linked Data
FedX - Optimization Techniques for Federated Query Processing on Linked DataFedX - Optimization Techniques for Federated Query Processing on Linked Data
FedX - Optimization Techniques for Federated Query Processing on Linked Data
 
Dependent types (and other ideas for guaranteeing correctness with types)
Dependent types (and other ideas for guaranteeing correctness with types)Dependent types (and other ideas for guaranteeing correctness with types)
Dependent types (and other ideas for guaranteeing correctness with types)
 
SMWCon Fall 2015 FForms
SMWCon Fall 2015 FFormsSMWCon Fall 2015 FForms
SMWCon Fall 2015 FForms
 
Semantic Pipes and Semantic Mashups
Semantic Pipes and Semantic MashupsSemantic Pipes and Semantic Mashups
Semantic Pipes and Semantic Mashups
 
The WorldCat Search API
The WorldCat Search APIThe WorldCat Search API
The WorldCat Search API
 
2008 11 13 Hcls Call
2008 11 13 Hcls Call2008 11 13 Hcls Call
2008 11 13 Hcls Call
 
Rdf
RdfRdf
Rdf
 
Resource description framework
Resource description frameworkResource description framework
Resource description framework
 
215 oodb
215 oodb215 oodb
215 oodb
 
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
 
Mapping Hierarchical Sources into RDF using the RML Mapping Language
Mapping Hierarchical Sources into RDF using the RML Mapping LanguageMapping Hierarchical Sources into RDF using the RML Mapping Language
Mapping Hierarchical Sources into RDF using the RML Mapping Language
 
From Ontology to Wiki: Automating Generation of Semantic Wiki Interfaces from...
From Ontology to Wiki: Automating Generation of Semantic Wiki Interfaces from...From Ontology to Wiki: Automating Generation of Semantic Wiki Interfaces from...
From Ontology to Wiki: Automating Generation of Semantic Wiki Interfaces from...
 
Session 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing BasicsSession 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing Basics
 
Semantic web for ontology chapter4 bynk
Semantic web for ontology chapter4 bynkSemantic web for ontology chapter4 bynk
Semantic web for ontology chapter4 bynk
 

Viewers also liked

SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 20...
SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 20...SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 20...
SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 20...Allison Jai O'Dell
 
SKOS, Simple Knowledge Organization System: University of Florida Libraries, ...
SKOS, Simple Knowledge Organization System: University of Florida Libraries, ...SKOS, Simple Knowledge Organization System: University of Florida Libraries, ...
SKOS, Simple Knowledge Organization System: University of Florida Libraries, ...Allison Jai O'Dell
 
Teaching Linked Data to Librarians: A Discussion of Pedagogical Methods
Teaching Linked Data to Librarians: A Discussion of Pedagogical MethodsTeaching Linked Data to Librarians: A Discussion of Pedagogical Methods
Teaching Linked Data to Librarians: A Discussion of Pedagogical MethodsAllison Jai O'Dell
 
Cataloging Zines in an RDA Environment
Cataloging Zines in an RDA EnvironmentCataloging Zines in an RDA Environment
Cataloging Zines in an RDA EnvironmentAllison Jai O'Dell
 
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...Allison Jai O'Dell
 
Defining Usefulness and Facilitating Access Based on Research Applications
Defining Usefulness and Facilitating Access Based on Research ApplicationsDefining Usefulness and Facilitating Access Based on Research Applications
Defining Usefulness and Facilitating Access Based on Research ApplicationsAllison Jai O'Dell
 
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...Allison Jai O'Dell
 
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...Allison Jai O'Dell
 
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...Notes from the Library Juice Academy course, “Introduction to XML”: Universit...
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...Allison Jai O'Dell
 
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...Allison Jai O'Dell
 
Cataloger 3.0: Competencies and Education for the BIBFRAME Catalog
Cataloger 3.0: Competencies and Education for the BIBFRAME CatalogCataloger 3.0: Competencies and Education for the BIBFRAME Catalog
Cataloger 3.0: Competencies and Education for the BIBFRAME CatalogAllison Jai O'Dell
 
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...Allison Jai O'Dell
 
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...Allison Jai O'Dell
 
Big Metadata: Mining Special Collections Catalogs for New Knowledge
Big Metadata: Mining Special Collections Catalogs for New KnowledgeBig Metadata: Mining Special Collections Catalogs for New Knowledge
Big Metadata: Mining Special Collections Catalogs for New KnowledgeAllison Jai O'Dell
 
Introducing the Artists' Books Thesaurus
Introducing the Artists' Books ThesaurusIntroducing the Artists' Books Thesaurus
Introducing the Artists' Books ThesaurusAllison Jai O'Dell
 
Understanding Regular expressions: Programming Historian Study Group, Univers...
Understanding Regular expressions: Programming Historian Study Group, Univers...Understanding Regular expressions: Programming Historian Study Group, Univers...
Understanding Regular expressions: Programming Historian Study Group, Univers...Allison Jai O'Dell
 
Descriptive Cataloging for Special Collections, University of Miami Libraries
Descriptive Cataloging for Special Collections, University of Miami LibrariesDescriptive Cataloging for Special Collections, University of Miami Libraries
Descriptive Cataloging for Special Collections, University of Miami LibrariesAllison Jai O'Dell
 
Studying the book arts in the 21st century: using Linked Data to enhance know...
Studying the book arts in the 21st century: using Linked Data to enhance know...Studying the book arts in the 21st century: using Linked Data to enhance know...
Studying the book arts in the 21st century: using Linked Data to enhance know...Allison Jai O'Dell
 
Designing Metadata to Meet User Needs for Special Collections
Designing Metadata to Meet User Needs for Special CollectionsDesigning Metadata to Meet User Needs for Special Collections
Designing Metadata to Meet User Needs for Special CollectionsAllison Jai O'Dell
 

Viewers also liked (20)

SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 20...
SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 20...SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 20...
SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 20...
 
SKOS, Simple Knowledge Organization System: University of Florida Libraries, ...
SKOS, Simple Knowledge Organization System: University of Florida Libraries, ...SKOS, Simple Knowledge Organization System: University of Florida Libraries, ...
SKOS, Simple Knowledge Organization System: University of Florida Libraries, ...
 
Teaching Linked Data to Librarians: A Discussion of Pedagogical Methods
Teaching Linked Data to Librarians: A Discussion of Pedagogical MethodsTeaching Linked Data to Librarians: A Discussion of Pedagogical Methods
Teaching Linked Data to Librarians: A Discussion of Pedagogical Methods
 
Cataloging Zines in an RDA Environment
Cataloging Zines in an RDA EnvironmentCataloging Zines in an RDA Environment
Cataloging Zines in an RDA Environment
 
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...
 
Defining Usefulness and Facilitating Access Based on Research Applications
Defining Usefulness and Facilitating Access Based on Research ApplicationsDefining Usefulness and Facilitating Access Based on Research Applications
Defining Usefulness and Facilitating Access Based on Research Applications
 
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...
 
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
 
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...Notes from the Library Juice Academy course, “Introduction to XML”: Universit...
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...
 
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...
 
Cataloger 3.0: Competencies and Education for the BIBFRAME Catalog
Cataloger 3.0: Competencies and Education for the BIBFRAME CatalogCataloger 3.0: Competencies and Education for the BIBFRAME Catalog
Cataloger 3.0: Competencies and Education for the BIBFRAME Catalog
 
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...
 
Using EAC-CPF
Using EAC-CPFUsing EAC-CPF
Using EAC-CPF
 
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...
 
Big Metadata: Mining Special Collections Catalogs for New Knowledge
Big Metadata: Mining Special Collections Catalogs for New KnowledgeBig Metadata: Mining Special Collections Catalogs for New Knowledge
Big Metadata: Mining Special Collections Catalogs for New Knowledge
 
Introducing the Artists' Books Thesaurus
Introducing the Artists' Books ThesaurusIntroducing the Artists' Books Thesaurus
Introducing the Artists' Books Thesaurus
 
Understanding Regular expressions: Programming Historian Study Group, Univers...
Understanding Regular expressions: Programming Historian Study Group, Univers...Understanding Regular expressions: Programming Historian Study Group, Univers...
Understanding Regular expressions: Programming Historian Study Group, Univers...
 
Descriptive Cataloging for Special Collections, University of Miami Libraries
Descriptive Cataloging for Special Collections, University of Miami LibrariesDescriptive Cataloging for Special Collections, University of Miami Libraries
Descriptive Cataloging for Special Collections, University of Miami Libraries
 
Studying the book arts in the 21st century: using Linked Data to enhance know...
Studying the book arts in the 21st century: using Linked Data to enhance know...Studying the book arts in the 21st century: using Linked Data to enhance know...
Studying the book arts in the 21st century: using Linked Data to enhance know...
 
Designing Metadata to Meet User Needs for Special Collections
Designing Metadata to Meet User Needs for Special CollectionsDesigning Metadata to Meet User Needs for Special Collections
Designing Metadata to Meet User Needs for Special Collections
 

Similar to Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: University of Florida Libraries, Linked Data Working Group, Tech Talk, 15 March 2016

SPARQL-DL - Theory & Practice
SPARQL-DL - Theory & PracticeSPARQL-DL - Theory & Practice
SPARQL-DL - Theory & PracticeAdriel Café
 
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.
 
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
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLMyungjin Lee
 
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
 
SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)andyseaborne
 
Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)Olaf Hartig
 
Bio ontologies and semantic technologies
Bio ontologies and semantic technologiesBio ontologies and semantic technologies
Bio ontologies and semantic technologiesProf. Wim Van Criekinge
 
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language Biswanath Dutta
 
Sparql a simple knowledge query
Sparql  a simple knowledge querySparql  a simple knowledge query
Sparql a simple knowledge queryStanley Wang
 
Querying Linked Data with SPARQL
Querying Linked Data with SPARQLQuerying Linked Data with SPARQL
Querying Linked Data with SPARQLOlaf Hartig
 
Harmonization of vocabularies for water data
Harmonization of vocabularies for water dataHarmonization of vocabularies for water data
Harmonization of vocabularies for water dataSimon Cox
 
balloon Fusion: SPARQL Rewriting Based on Unified Co-Reference Information
balloon Fusion: SPARQL Rewriting Based on  Unified Co-Reference Informationballoon Fusion: SPARQL Rewriting Based on  Unified Co-Reference Information
balloon Fusion: SPARQL Rewriting Based on Unified Co-Reference InformationKai Schlegel
 
SWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQLSWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQLMariano Rodriguez-Muro
 
BioSamples Database Linked Data, SWAT4LS Tutorial
BioSamples Database Linked Data, SWAT4LS TutorialBioSamples Database Linked Data, SWAT4LS Tutorial
BioSamples Database Linked Data, SWAT4LS TutorialRothamsted Research, UK
 

Similar to Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: University of Florida Libraries, Linked Data Working Group, Tech Talk, 15 March 2016 (20)

SPARQL-DL - Theory & Practice
SPARQL-DL - Theory & PracticeSPARQL-DL - Theory & Practice
SPARQL-DL - Theory & Practice
 
Querying Linked Data
Querying Linked DataQuerying Linked Data
Querying Linked Data
 
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
 
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
 
Sparql
SparqlSparql
Sparql
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQL
 
Querying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLQuerying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQL
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
SPARQL Cheat Sheet
SPARQL Cheat SheetSPARQL Cheat Sheet
SPARQL Cheat Sheet
 
SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)
 
Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)
 
Bio ontologies and semantic technologies
Bio ontologies and semantic technologiesBio ontologies and semantic technologies
Bio ontologies and semantic technologies
 
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
 
Sparql a simple knowledge query
Sparql  a simple knowledge querySparql  a simple knowledge query
Sparql a simple knowledge query
 
Querying Linked Data with SPARQL
Querying Linked Data with SPARQLQuerying Linked Data with SPARQL
Querying Linked Data with SPARQL
 
Harmonization of vocabularies for water data
Harmonization of vocabularies for water dataHarmonization of vocabularies for water data
Harmonization of vocabularies for water data
 
balloon Fusion: SPARQL Rewriting Based on Unified Co-Reference Information
balloon Fusion: SPARQL Rewriting Based on  Unified Co-Reference Informationballoon Fusion: SPARQL Rewriting Based on  Unified Co-Reference Information
balloon Fusion: SPARQL Rewriting Based on Unified Co-Reference Information
 
SWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQLSWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQL
 
BioSamples Database Linked Data, SWAT4LS Tutorial
BioSamples Database Linked Data, SWAT4LS TutorialBioSamples Database Linked Data, SWAT4LS Tutorial
BioSamples Database Linked Data, SWAT4LS Tutorial
 

Recently uploaded

Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Cathrine Wilhelmsen
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSINGmarianagonzalez07
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queensdataanalyticsqueen03
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxMike Bennett
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...ssuserf63bd7
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 

Recently uploaded (20)

Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queens
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptx
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 

Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: University of Florida Libraries, Linked Data Working Group, Tech Talk, 15 March 2016

  • 1. Tech Talk BIBFRAMEWorking Group 15 March 2016 Notes from the Library Juice Academy courses on “SPARQL Fundamentals” Allison Jai O’Dell | AJODELL@ufl.edu
  • 2. SPARQL The SPARQL Protocol and RDF Query Language (SPARQL) is “a semantic query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format” --Wikipedia
  • 3. Turtle Syntax SPARQL uses the triple pattern and Turtle syntax Turtle: Terse RDF Triple Language <http://www.example.com/uri> namespace:element “literal” . “literal”@en  Literal with a language tag “literal”^^xsd:integer  Typed literal
  • 4. Basic SPARQL Query PREFIX dct: <http://purl.org/dc/terms/> SELECT ?subject WHERE { <http://www.worldcat.org/oclc/704257552> dct:creator ?subject . } PREFIX specifies namespaces SELECT specifies solutions to return WHERE specifies triple & graph patterns to query
  • 5. DISTINCT Modifier PREFIX dct: <http://purl.org/dc/terms/> SELECT DISTINCT ?subject WHERE { ?title dct:subject ?subject . } DISTINCT de-duplicates solutions
  • 6. More Modifiers PREFIX dct: <http://purl.org/dc/terms/> SELECT ?title ?subject WHERE { ?title dct:subject ?subject . } ORDER BY ?subject LIMIT 5 OFFSET 10 ORDER BY specifies how to sort solutions. OFFSET causes the solutions generated to start after the specified number of solutions. LIMIT puts an upper bound on the number of solutions returned.
  • 7. Federated Queries PREFIX dct: <http://purl.org/dc/terms/> SELECT DISTINCT ?subject WHERE { SERVICE <http://dbpedia.org/snorql> { ?title dct:subject ?subject . } } SERVICE lets you run federated queries over multiple endpoints
  • 8. Helpful Operators • Conjunction / Boolean “and” A . B • Disjunction / Boolean “or” {A} UNION {B} • Negation A MINUS {B}
  • 9. Property Paths • path1/path2 Sequence path (pipe) • ^path1 Inverse path (object to subject) • path1|path2 Alternative path (either path1 or path2) • path1* path1 repeated zero or more times • path1+ path1 repeated one or more times • path1? Zero or one, e.g., path1 is optional • !(set) Negation
  • 10. Slightly complicated SPARQL Query # British Museum http://collection.britishmuseum.org/sparql PREFIX crm: <http://erlangen-crm.org/current/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX ecrm: <http://erlangen-crm.org/current/> PREFIX bmo: <http://collection.britishmuseum.org/id/ontology/> SELECT ?physdesc { ?henry skos:prefLabel "Henry Spencer Ashbee" . ?henry ^ecrm:P51_has_former_or_current_owner/ bmo:PX_physical_description ?physdesc . }
  • 11. Four Query Forms • SELECT • CONSTRUCT Construct new RDF triples & graphs based on patterns and existing data • ASK Ask whether or not a pattern matches the data; result is true or false • DESCRIBE Describe the resources matched by given variables
  • 12. CONSTRUCT Query PREFIX dbr: <http://dbpedia.org/resource/> PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> CONSTRUCT { dbr:Mindy_Kaling foaf:knows ?who . ?who foaf:knows ?more . } WHERE { SERVICE <http://dbpedia.org/sparql> { dbr:The_Mindy_Project dbo:starring ?who . ?who ^dbo:starring/dbo:starring ?more . } }
  • 13. Let’s have a go. http://dbpedia.org/snorql/ http://collection.britishmuseum.org/sparql