SPARQL 1.1
Update Language

SPARQL 1.1 Update
Overview
• SPARQL 1.1 Update Overview
• Graph Updates
–
–
–
–
–

Insert
Delete
Delete/Insert
Load
Clear

• Graph Management
– Create
– Drop
– Copy, Move, Add
SPARQL 1.1 Update

#2
SPARQL 1.1 Update Overview
• SPARQL 1.1 increases further the prominence of
named graphs in RDF
• It offers three ways to affect explicitly specified data
within a graph (or graphs):
– INSERT DATA
– DELETE DATA
– DELETE/INSERT … WHERE …

• It also offers two ways to further change the data
within a graph:
– LOAD – CLEAR

• It offers a set of graph management operations:
– CREATE – DROP – COPY – MOVE – ADD
SPARQL 1.1 Update

#3
INSERT DATA
• The most basic part of SPARQL 1.1 Update is to allow
data to be inserted into a store, e.g.:
INSERT DATA {ou:barry foaf:givenName "Barry";
foaf:familyName "Norton";
foaf:mbox <mailto:barry.norton@sti2.at>}

• While a default graph may be supported, it is common
to manage data in a named graph:
INSERT DATA { GRAPH <http://ontotext.com/ns#>
{onto:barry1 foaf:givenName "Barry";
foaf:familyName "Bishop";
foaf:mbox <barry.bishop@ontotext.com>}}
SPARQL 1.1 Update

#4
DELETE DATA
• SPARQL 1.1 Update also allows deletion of explicitly
described triples:
DELETE DATA {sti:barry foaf:mbox
<mailto:barry.norton@sti2.at>}

• Note that no blank nodes are allowed in these DELETE
queries since these match any resource in SPARQL
(Cf.:
SELECT ?mbox WHERE {_:barry foaf:mbox ?mbox}
mbox
<mailto:b.j.norton@open.ac.uk>
SPARQL 1.1 Update

)
#5
DELETE/INSERT
• SPARQL 1.1 extends the use of graph patterns for use
in parallel INSERT and DELETE, according to matches,
e.g.:
DELETE {?barry foaf:mbox <mailto:barry.norton@sti2.at>}
INSERT { GRAPH <http://ontotext.com/ns#>
{onto:barry foaf:givenName ?forename;
foaf:familyName ?surname;
foaf:mbox <mailto:barry.norton@ontotext.com>}}
WHERE {?barry foaf:mbox <mailto:barry.norton@sti2.at>;
foaf:givenName ?forename;
foaf:familyName ?surname}
}
SPARQL 1.1 Update

#6
DELETE WHERE
• SPARQL 1.1 offers a simpler form of INSERT/DELETE
when just deleting:
DELETE {?barry foaf:mbox <mailto:barry.norton@sti2.at>}
WHERE {?barry foaf:mbox <mailto:barry.norton@sti2.at>}

DELETE
WHERE {?barry foaf:mbox <mailto:barry.norton@sti2.at>}

SPARQL 1.1 Update

#7
USING/WITH
• SPARQL Update uses USING (NAMED) in role of
FROM (NAMED) with respect to WHERE clauses
INSERT { GRAPH <http://ontotext.com/ns#>
{?barry foaf:nick "Baz"}}
USING <http://ontotext.com/ns#>
WHERE {?barry foaf:givenName "Barry"}

• It also offers a simpler way to deal with the same
named graph throughout a DELETE/INSERT query
WITH <http://ontotext.com/ns#>
INSERT {?barry foaf:nick "Baz"}
WHERE {?barry foaf:givenName "Barry"}
SPARQL 1.1 Update

#8
LOAD/CLEAR
• SPARQL 1.1 allows an RDF graph to be loaded from a
URL, e.g.:
LOAD <http://xmlns.com/foaf/spec/20100809.rdf>

• The graph can also be loaded as a named graph, e.g.:
LOAD
<http://dl.dropbox.com/u/3954923/ontotext.rdf.ttl>
INTO <http://ontotext.com/ns#>

• A named graph can also be cleared of all triples, e.g.:
CLEAR GRAPH <http://ontotext.com/ns#>
SPARQL 1.1 Update

#9
Graph Management 1/2
• A new named graph can be explicitly created, e.g.:
CREATE GRAPH <http://ontotext.com/ns#>

• A new named graph can be dropped (different from
clearing if empty graphs are supported), e.g.:
DROP GRAPH <http://ontotext.com/ns#>

• We can also CLEAR, CREATE and DROP:
DEFAULT and ALL
• We also LOAD, CLEAR, CREATE and DROP with SILENT
SPARQL 1.1 Update

#10
Graph Management 2/2
• The recommendation for SPARQL Update may or
may not also include:
– COPY… TO …, e.g.:
COPY GRAPH <http://www.example.com/v1#>
TO GRAPH <http://www.example.com/v2#>

– MOVE… TO …, e.g.:
MOVE GRAPH <http://www.example.com/draft#>
TO GRAPH <http://www.example.com/v1#>

– ADD… TO …, e.g.:
ADD GRAPH <http://ontotext.com/ns#>
TO GRAPH <http://sirma.bg/ns#>
SPARQL 1.1 Update

#11

More Related Content

DOC
NOTES ON "FOXPRO"
PDF
Foxpro (1)
PDF
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: SPARQL 1.1 Query Language
PDF
DBpedia past, present & future
PDF
Learning sparql 2012 12
PDF
Intro to Linked Data: SPARQL
PPTX
Mehndi Bridal Dresses
PPTX
ontop: A tutorial
NOTES ON "FOXPRO"
Foxpro (1)
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: SPARQL 1.1 Query Language
DBpedia past, present & future
Learning sparql 2012 12
Intro to Linked Data: SPARQL
Mehndi Bridal Dresses
ontop: A tutorial

Viewers also liked (16)

PDF
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
PDF
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
PDF
The Semantics of SPARQL
PDF
Answers to usual issues in getting started with consuming Linked Data (2010)
PDF
Tutorial: SPARQL 1.0 - I. Fundulaki - ESWC SS 2014
PDF
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
PDF
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
PPT
Realizing a Semantic Web Application - ICWE 2010 Tutorial
ODP
Building a semantic website
PPT
Ontology Mapping
PPT
SPARQL in a nutshell
PPT
SPARQL Tutorial
PDF
DBpedia Tutorial - Feb 2015, Dublin
PDF
Introduction to RDF & SPARQL
PPTX
CSHALS 2010 W3C Semanic Web Tutorial
PPSX
Introduction to SPARQL
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
The Semantics of SPARQL
Answers to usual issues in getting started with consuming Linked Data (2010)
Tutorial: SPARQL 1.0 - I. Fundulaki - ESWC SS 2014
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
Realizing a Semantic Web Application - ICWE 2010 Tutorial
Building a semantic website
Ontology Mapping
SPARQL in a nutshell
SPARQL Tutorial
DBpedia Tutorial - Feb 2015, Dublin
Introduction to RDF & SPARQL
CSHALS 2010 W3C Semanic Web Tutorial
Introduction to SPARQL
Ad

More from eswcsummerschool (20)

PPTX
Semantic Aquarium - ESWC SSchool 14 - Student project
PPTX
Syrtaki - ESWC SSchool 14 - Student project
PDF
Keep fit (a bit) - ESWC SSchool 14 - Student project
PDF
Arabic Sentiment Lexicon - ESWC SSchool 14 - Student project
PPTX
FIT-8BIT An activity music assistant - ESWC SSchool 14 - Student project
PPTX
Personal Tours at the British Museum - ESWC SSchool 14 - Student project
PPTX
Exhibition recommendation using British Museum data and Event Registry - ESWC...
PPTX
Empowering fishing business using Linked Data - ESWC SSchool 14 - Student pro...
PDF
Tutorial: Social Semantic Web and Crowdsourcing - E. Simperl - ESWC SS 2014
PDF
Keynote: Global Media Monitoring - M. Grobelnik - ESWC SS 2014
PDF
Hands On: Amazon Mechanical Turk - M. Acosta - ESWC SS 2014
PDF
Tutorial: Querying a Marine Data Warehouse Using SPARQL - I. Fundulaki - ESWC...
PDF
Mon norton tut_publishing01
PDF
Mon domingue introduction to the school
PDF
Mon norton tut_querying cultural heritage data
PDF
Tue acosta hands_on_providinglinkeddata
PDF
Thu bernstein key_warp_speed
PDF
Fri schreiber key_knowledge engineering
PDF
Mon norton tut_queryinglinkeddata02
PDF
Mon fundulaki tut_querying linked data
Semantic Aquarium - ESWC SSchool 14 - Student project
Syrtaki - ESWC SSchool 14 - Student project
Keep fit (a bit) - ESWC SSchool 14 - Student project
Arabic Sentiment Lexicon - ESWC SSchool 14 - Student project
FIT-8BIT An activity music assistant - ESWC SSchool 14 - Student project
Personal Tours at the British Museum - ESWC SSchool 14 - Student project
Exhibition recommendation using British Museum data and Event Registry - ESWC...
Empowering fishing business using Linked Data - ESWC SSchool 14 - Student pro...
Tutorial: Social Semantic Web and Crowdsourcing - E. Simperl - ESWC SS 2014
Keynote: Global Media Monitoring - M. Grobelnik - ESWC SS 2014
Hands On: Amazon Mechanical Turk - M. Acosta - ESWC SS 2014
Tutorial: Querying a Marine Data Warehouse Using SPARQL - I. Fundulaki - ESWC...
Mon norton tut_publishing01
Mon domingue introduction to the school
Mon norton tut_querying cultural heritage data
Tue acosta hands_on_providinglinkeddata
Thu bernstein key_warp_speed
Fri schreiber key_knowledge engineering
Mon norton tut_queryinglinkeddata02
Mon fundulaki tut_querying linked data
Ad

Recently uploaded (20)

PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
Tartificialntelligence_presentation.pptx
PDF
Hybrid model detection and classification of lung cancer
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Architecture types and enterprise applications.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Unlock new opportunities with location data.pdf
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Five Habits of High-Impact Board Members
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Assigned Numbers - 2025 - Bluetooth® Document
sustainability-14-14877-v2.pddhzftheheeeee
Tartificialntelligence_presentation.pptx
Hybrid model detection and classification of lung cancer
observCloud-Native Containerability and monitoring.pptx
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Getting Started with Data Integration: FME Form 101
Developing a website for English-speaking practice to English as a foreign la...
O2C Customer Invoices to Receipt V15A.pptx
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Architecture types and enterprise applications.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
A novel scalable deep ensemble learning framework for big data classification...
Module 1.ppt Iot fundamentals and Architecture
Unlock new opportunities with location data.pdf
A review of recent deep learning applications in wood surface defect identifi...
Five Habits of High-Impact Board Members
NewMind AI Weekly Chronicles – August ’25 Week III
Web Crawler for Trend Tracking Gen Z Insights.pptx

ESWC SS 2012 - Monday Tutorial 2 Barry Norton: SPARQL 1.1 Update Language

  • 2. Overview • SPARQL 1.1 Update Overview • Graph Updates – – – – – Insert Delete Delete/Insert Load Clear • Graph Management – Create – Drop – Copy, Move, Add SPARQL 1.1 Update #2
  • 3. SPARQL 1.1 Update Overview • SPARQL 1.1 increases further the prominence of named graphs in RDF • It offers three ways to affect explicitly specified data within a graph (or graphs): – INSERT DATA – DELETE DATA – DELETE/INSERT … WHERE … • It also offers two ways to further change the data within a graph: – LOAD – CLEAR • It offers a set of graph management operations: – CREATE – DROP – COPY – MOVE – ADD SPARQL 1.1 Update #3
  • 4. INSERT DATA • The most basic part of SPARQL 1.1 Update is to allow data to be inserted into a store, e.g.: INSERT DATA {ou:barry foaf:givenName "Barry"; foaf:familyName "Norton"; foaf:mbox <mailto:barry.norton@sti2.at>} • While a default graph may be supported, it is common to manage data in a named graph: INSERT DATA { GRAPH <http://ontotext.com/ns#> {onto:barry1 foaf:givenName "Barry"; foaf:familyName "Bishop"; foaf:mbox <barry.bishop@ontotext.com>}} SPARQL 1.1 Update #4
  • 5. DELETE DATA • SPARQL 1.1 Update also allows deletion of explicitly described triples: DELETE DATA {sti:barry foaf:mbox <mailto:barry.norton@sti2.at>} • Note that no blank nodes are allowed in these DELETE queries since these match any resource in SPARQL (Cf.: SELECT ?mbox WHERE {_:barry foaf:mbox ?mbox} mbox <mailto:b.j.norton@open.ac.uk> SPARQL 1.1 Update ) #5
  • 6. DELETE/INSERT • SPARQL 1.1 extends the use of graph patterns for use in parallel INSERT and DELETE, according to matches, e.g.: DELETE {?barry foaf:mbox <mailto:barry.norton@sti2.at>} INSERT { GRAPH <http://ontotext.com/ns#> {onto:barry foaf:givenName ?forename; foaf:familyName ?surname; foaf:mbox <mailto:barry.norton@ontotext.com>}} WHERE {?barry foaf:mbox <mailto:barry.norton@sti2.at>; foaf:givenName ?forename; foaf:familyName ?surname} } SPARQL 1.1 Update #6
  • 7. DELETE WHERE • SPARQL 1.1 offers a simpler form of INSERT/DELETE when just deleting: DELETE {?barry foaf:mbox <mailto:barry.norton@sti2.at>} WHERE {?barry foaf:mbox <mailto:barry.norton@sti2.at>} DELETE WHERE {?barry foaf:mbox <mailto:barry.norton@sti2.at>} SPARQL 1.1 Update #7
  • 8. USING/WITH • SPARQL Update uses USING (NAMED) in role of FROM (NAMED) with respect to WHERE clauses INSERT { GRAPH <http://ontotext.com/ns#> {?barry foaf:nick "Baz"}} USING <http://ontotext.com/ns#> WHERE {?barry foaf:givenName "Barry"} • It also offers a simpler way to deal with the same named graph throughout a DELETE/INSERT query WITH <http://ontotext.com/ns#> INSERT {?barry foaf:nick "Baz"} WHERE {?barry foaf:givenName "Barry"} SPARQL 1.1 Update #8
  • 9. LOAD/CLEAR • SPARQL 1.1 allows an RDF graph to be loaded from a URL, e.g.: LOAD <http://xmlns.com/foaf/spec/20100809.rdf> • The graph can also be loaded as a named graph, e.g.: LOAD <http://dl.dropbox.com/u/3954923/ontotext.rdf.ttl> INTO <http://ontotext.com/ns#> • A named graph can also be cleared of all triples, e.g.: CLEAR GRAPH <http://ontotext.com/ns#> SPARQL 1.1 Update #9
  • 10. Graph Management 1/2 • A new named graph can be explicitly created, e.g.: CREATE GRAPH <http://ontotext.com/ns#> • A new named graph can be dropped (different from clearing if empty graphs are supported), e.g.: DROP GRAPH <http://ontotext.com/ns#> • We can also CLEAR, CREATE and DROP: DEFAULT and ALL • We also LOAD, CLEAR, CREATE and DROP with SILENT SPARQL 1.1 Update #10
  • 11. Graph Management 2/2 • The recommendation for SPARQL Update may or may not also include: – COPY… TO …, e.g.: COPY GRAPH <http://www.example.com/v1#> TO GRAPH <http://www.example.com/v2#> – MOVE… TO …, e.g.: MOVE GRAPH <http://www.example.com/draft#> TO GRAPH <http://www.example.com/v1#> – ADD… TO …, e.g.: ADD GRAPH <http://ontotext.com/ns#> TO GRAPH <http://sirma.bg/ns#> SPARQL 1.1 Update #11