SlideShare une entreprise Scribd logo
1  sur  23
SPARQL 1.1

Andy Seaborne
SPARQL is ...
●   A standard query language for RDF
    –   And now with update of RDF stores
●   Product of W3C Process
        ●   Submissions
        ●   “members”
        ●   Working groups
        ●   Consensus (amongst the active participants)
●   Widely implemented
History 1.0
●   SPARQL 1.0
    –   Timescale: 2004 – 2008
        ●   2 years late
    –   Lots of choices for starting points
    –   Controversies
        ●   Syntax
        ●   Named graphs
        ●   Algebra
SPARQL 1.0 Example
@prefix person: <http://example/person/> .
@prefix foaf:   <http://xmlns.com/foaf/0.1/> .

person:A foaf:name "Alice" .
person:A foaf:mbox <mailto:alice@example.net> .
person:B foaf:name "Bob" .


PREFIX person: <http://example/person/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT ?n ?mailbox
WHERE
  { person:A foaf:mbox ?mailbox ;
             foaf:name ?n . }


----------------------------------------
| n       | mailbox                    |
========================================
| "Alice" | <mailto:alice@example.net> |
----------------------------------------
SPARQL 1.0 Example
@prefix dc:    <http://purl.org/dc/elements/1.1/> .
@prefix stock: <http://example.org/stock#> .

stock:book1   dc:title   "SPARQL Query Language Tutorial" .
stock:book2   dc:title   "SPARQL Query Language (2nd ed)" .
stock:book3   dc:title   "Moving from SQL to SPARQL" .
stock:book4   dc:title   "Applying XQuery" .

PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX stock: <http://example.org/stock#>

SELECT ?book ?title
{
  ?book dc:title ?title .
  FILTER (regex(?title, "SPARQL"))
}


--------------------------------------------------
| book        | title                            |
==================================================
| stock:book3 | "Moving from SQL to SPARQL"      |
| stock:book2 | "SPARQL Query Language (2nd ed)" |
| stock:book1 | "SPARQL Query Language Tutorial" |
--------------------------------------------------
SPARQL 1.0
●   Experimentation for new features started
    before the first standard was published
    –   But you can't wait until “completely complete”
●   Issues
    –   Counting
    –   Standard function library
    –   Hard-to-use negation
    –   Query only, no update
    –   Only a “note” about a JSON output
History 1.1
●   SPARQL 1.1
    –   Timescale : 2009 – 2013
        ●   2 years late …
    –   Controversies
        ●   Negation
        ●   Property paths
        ●   Graphs … REST ...
SPARQL 1.1
●
    SPARQL 1.1 Query
●   SPARQL 1.1 Update
●
    SPARQL 1.1 Protocol
●   SPARQL 1.1 Graph Store Protocol
●
    SPARQL 1.1 Service Description
●   SPARQL 1.1 Federated Query
●
    SPARQL 1.1 Query Results JSON Format
●   SPARQL 1.1 Query Results CSV and TSV Formats
●
    SPARQL Query Results XML Format
●
    SPARQL 1.1 Entailment Regimes
SPARQL 1.1
              The important bits (IMO)
●   SPARQL 1.1 Query
    –   Subqueries, aggregation
    –   negation
    –   property paths
    –   remote query
●   SPARQL 1.1 Update
●   SPARQL 1.1 Graph Store Protocol
SPARQL 1.1 Query Examples
PREFIX rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf:       <http://xmlns.com/foaf/0.1/>

SELECT ?name
{
  { SELECT ?x (count(*) AS ?count)
    { ?x foaf:knows ?y . }
    GROUP BY ?x
    HAVING (?count = 3)
  }
  ?x foaf:name ?name .
}


PREFIX rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf:       <http://xmlns.com/foaf/0.1/>

SELECT ?x
{ ?x rdf:type foaf:Person .
  FILTER NOT EXISTS { ?x foaf:name ?name }
}
Property Paths and Inference
      Class inference
PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
PREFIX :       <http://example/>

SELECT ?s {
    ?s rdf:type ?T .
    ?T rdfs:subClassOf* :SomeClass .
}



       Property inference
PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
PREFIX :       <http://example/>

SELECT * {
    ?s ?p ?o .
    ?p rdfs:subPropertyOf* :property .
}
SPARQL 1.1 Update
●   Fine grain graph manipulations
    –   Act on a “graph store”
    –   Add and remove graphs
    –   Act on the contents of graphs
    –   Quad centric
●   LOAD, DROP, CREATE
●   INSERT, DELETE
    –   Data and patterns
●   One request is multiple operations
Data Operations
PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf:   <http://xmlns.com/foaf/0.1/>

DELETE DATA { <http://example/abc> foaf:name "DEF" . } ;

INSERT DATA { <http://example/abc> foaf:name "ABC" . } ;
Pattern Operations : DELETE-INSERT
     Pattern → Delete triples → Insert triples


 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 PREFIX vc:     <http://www.w3.org/2006/vcard/ns#>

 DELETE { ?p vc:fn ?x }
 INSERT { ?p foaf:name ?x }
 WHERE
 {
    ?p vc:fn ?x .
    ?p foaf:knows <http://example/#me> }
 }
SPARQL 1.1 Graph Store Protocol
●   Simple way to manage a store (RDF Dataset)
●   GET, PUT, POST, DELETE
●   Naming
    –   Same server
          http://server/store/graph1
    –   Different server
          http://server/store?graph=http://example/g1
          http://server/store?graph=http%3A//example/g1
          http://server/store?default
RESTful(ish) operation
 curl -T D.ttl --header 'Content-type: text/turtle' 
        http://server.com/store?graph=http%3A//example/g1




PUT /store?graph=http%3A//example/g1 HTTP/1.1
Host: server.com
Content-type: text/turtle

@prefix : <http://example/> .

:subject :pred1 1 ;

     :pred2 “hello” .
Digression: RDF 1.1
●   Work-in-progress
●   Incremental
●   Turtle, TriG, N-Triples, N-Quads
●   RDF Datasets (as SPARQL?)
●   Related: JSON-LD
JSON-LD
●   Links and semantics for the JSON ecosystem
●   Adds a "context" to map JSON to RDF
●   RDF → JSON-LD → RDF is lossless
{
    "@context": "http://json-ld.org/contexts/person.jsonld",
    "@id": "http://example.org/alice.foaf#me",
    "name": "Alice Hacker",
    "homepage": "http://example.org/alice",
}

@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<http://example.org/alice.foaf#me>
       foaf:name "Alice Hacker" ;
       foaf:homepage <http://example.org/alice> .
http://jena.apache.org/
Title:(asf_logo.eps)
Creator:Adobe Illustrator(R) 8.0
CreationDate:(10/20/99) (11:38 AM)
Apache Jena
●   Full Apache Project since May 2012
●   SPARQL 1.1
    –   Query
    –   Update
    –   Protocol
    –   Graph Store Protocol
Fuseki – SPARQL Server
           ●   SPARQL server
           ●   RDF native database
               –   ACID transactions
               –   Query timeout
           ●   Deployed live
Data Management
●   Web UI
●   curl / wget
●   SOH (SPARQL over HTTP)
    –   Scripts
    –   s-get, s-put, s-post, s-delete, s-query, s-update
Online
●   http://www.sparql.org/
    –   Fuseki running on Apache project hardware
●   Services
    –     SPARQL query validator
    –     SPARQL update validator
    –     RDF data validator
    –     IRI validator

Contenu connexe

Tendances

Querying Linked Data with SPARQL
Querying Linked Data with SPARQLQuerying Linked Data with SPARQL
Querying Linked Data with SPARQLOlaf Hartig
 
From SQL to SPARQL
From SQL to SPARQLFrom SQL to SPARQL
From SQL to SPARQLGeorge Roth
 
Data translation with SPARQL 1.1
Data translation with SPARQL 1.1Data translation with SPARQL 1.1
Data translation with SPARQL 1.1andreas_schultz
 
Twinkle: A SPARQL Query Tool
Twinkle: A SPARQL Query ToolTwinkle: A SPARQL Query Tool
Twinkle: A SPARQL Query ToolLeigh Dodds
 
SPARQL in a nutshell
SPARQL in a nutshellSPARQL in a nutshell
SPARQL in a nutshellFabien Gandon
 
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
 
The Semantics of SPARQL
The Semantics of SPARQLThe Semantics of SPARQL
The Semantics of SPARQLOlaf Hartig
 
RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031kwangsub kim
 
Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02eswcsummerschool
 
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
 
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
 
Relational Database to RDF (RDB2RDF)
Relational Database to RDF (RDB2RDF)Relational Database to RDF (RDB2RDF)
Relational Database to RDF (RDB2RDF)EUCLID project
 
Mapping Relational Databases to Linked Data
Mapping Relational Databases to Linked DataMapping Relational Databases to Linked Data
Mapping Relational Databases to Linked DataEUCLID project
 

Tendances (19)

Querying Linked Data with SPARQL
Querying Linked Data with SPARQLQuerying Linked Data with SPARQL
Querying Linked Data with SPARQL
 
From SQL to SPARQL
From SQL to SPARQLFrom SQL to SPARQL
From SQL to SPARQL
 
SPARQL 1.1 Status
SPARQL 1.1 StatusSPARQL 1.1 Status
SPARQL 1.1 Status
 
Data translation with SPARQL 1.1
Data translation with SPARQL 1.1Data translation with SPARQL 1.1
Data translation with SPARQL 1.1
 
Twinkle: A SPARQL Query Tool
Twinkle: A SPARQL Query ToolTwinkle: A SPARQL Query Tool
Twinkle: A SPARQL Query Tool
 
SPARQL in a nutshell
SPARQL in a nutshellSPARQL in a nutshell
SPARQL in a nutshell
 
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
 
Sparql
SparqlSparql
Sparql
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
Jena Programming
Jena ProgrammingJena Programming
Jena Programming
 
The Semantics of SPARQL
The Semantics of SPARQLThe Semantics of SPARQL
The Semantics of SPARQL
 
RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031
 
4 sw architectures and sparql
4 sw architectures and sparql4 sw architectures and sparql
4 sw architectures and sparql
 
Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02
 
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
 
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
 
Jena
JenaJena
Jena
 
Relational Database to RDF (RDB2RDF)
Relational Database to RDF (RDB2RDF)Relational Database to RDF (RDB2RDF)
Relational Database to RDF (RDB2RDF)
 
Mapping Relational Databases to Linked Data
Mapping Relational Databases to Linked DataMapping Relational Databases to Linked Data
Mapping Relational Databases to Linked Data
 

En vedette

Lecture semantic dataaccess_presentation
Lecture semantic dataaccess_presentationLecture semantic dataaccess_presentation
Lecture semantic dataaccess_presentationIKS - Project
 
Semantics for Big Data Integration and Analysis
Semantics for Big Data Integration and AnalysisSemantics for Big Data Integration and Analysis
Semantics for Big Data Integration and AnalysisCraig Knoblock
 
A First Course in RDF and RDFS (Resource Description Framework and Resource D...
A First Course in RDF and RDFS (Resource Description Framework and Resource D...A First Course in RDF and RDFS (Resource Description Framework and Resource D...
A First Course in RDF and RDFS (Resource Description Framework and Resource D...Mark Birbeck
 
Best Coding Practices For Android Application Development
Best Coding Practices For Android Application DevelopmentBest Coding Practices For Android Application Development
Best Coding Practices For Android Application DevelopmentKetan Raval
 
Using MongoDB as a high performance graph database
Using MongoDB as a high performance graph databaseUsing MongoDB as a high performance graph database
Using MongoDB as a high performance graph databaseChris Clarke
 

En vedette (6)

Google talk
Google talkGoogle talk
Google talk
 
Lecture semantic dataaccess_presentation
Lecture semantic dataaccess_presentationLecture semantic dataaccess_presentation
Lecture semantic dataaccess_presentation
 
Semantics for Big Data Integration and Analysis
Semantics for Big Data Integration and AnalysisSemantics for Big Data Integration and Analysis
Semantics for Big Data Integration and Analysis
 
A First Course in RDF and RDFS (Resource Description Framework and Resource D...
A First Course in RDF and RDFS (Resource Description Framework and Resource D...A First Course in RDF and RDFS (Resource Description Framework and Resource D...
A First Course in RDF and RDFS (Resource Description Framework and Resource D...
 
Best Coding Practices For Android Application Development
Best Coding Practices For Android Application DevelopmentBest Coding Practices For Android Application Development
Best Coding Practices For Android Application Development
 
Using MongoDB as a high performance graph database
Using MongoDB as a high performance graph databaseUsing MongoDB as a high performance graph database
Using MongoDB as a high performance graph database
 

Similaire à SPARQL 1.1 Update (2013-03-05)

A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic webMarakana Inc.
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLMyungjin Lee
 
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 WebShamod Lacoul
 
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
 
Grails And The Semantic Web
Grails And The Semantic WebGrails And The Semantic Web
Grails And The Semantic Webwilliam_greenly
 
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
 
Semantic Web introduction
Semantic Web introductionSemantic Web introduction
Semantic Web introductionGraphity
 
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)Kai Chan
 
Comparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPComparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPMSGUNC
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIsJosef Petrák
 
Real time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkReal time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkRahul Jain
 
SPARQLing Services
SPARQLing ServicesSPARQLing Services
SPARQLing ServicesLeigh Dodds
 
Structured-Streaming-as-a-Service with Kafka, YARN, and Tooling with Jim Dowling
Structured-Streaming-as-a-Service with Kafka, YARN, and Tooling with Jim DowlingStructured-Streaming-as-a-Service with Kafka, YARN, and Tooling with Jim Dowling
Structured-Streaming-as-a-Service with Kafka, YARN, and Tooling with Jim DowlingDatabricks
 
Semantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLSemantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLJerven Bolleman
 
RejectKaigi2010 - RDF.rb
RejectKaigi2010 - RDF.rbRejectKaigi2010 - RDF.rb
RejectKaigi2010 - RDF.rbFumihiro Kato
 

Similaire à SPARQL 1.1 Update (2013-03-05) (20)

A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic web
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQL
 
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
 
RDFauthor (EKAW)
RDFauthor (EKAW)RDFauthor (EKAW)
RDFauthor (EKAW)
 
Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)
 
Grails And The Semantic Web
Grails And The Semantic WebGrails And The Semantic Web
Grails And The Semantic Web
 
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
 
Semantic Web introduction
Semantic Web introductionSemantic Web introduction
Semantic Web introduction
 
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)
 
Querying Linked Data
Querying Linked DataQuerying Linked Data
Querying Linked Data
 
Madrid SPARQL handson
Madrid SPARQL handsonMadrid SPARQL handson
Madrid SPARQL handson
 
Comparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPComparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHP
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
 
Real time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkReal time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache Spark
 
SPARQLing Services
SPARQLing ServicesSPARQLing Services
SPARQLing Services
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
Structured-Streaming-as-a-Service with Kafka, YARN, and Tooling with Jim Dowling
Structured-Streaming-as-a-Service with Kafka, YARN, and Tooling with Jim DowlingStructured-Streaming-as-a-Service with Kafka, YARN, and Tooling with Jim Dowling
Structured-Streaming-as-a-Service with Kafka, YARN, and Tooling with Jim Dowling
 
Semantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLSemantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQL
 
RejectKaigi2010 - RDF.rb
RejectKaigi2010 - RDF.rbRejectKaigi2010 - RDF.rb
RejectKaigi2010 - RDF.rb
 

Dernier

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 

SPARQL 1.1 Update (2013-03-05)

  • 2. SPARQL is ... ● A standard query language for RDF – And now with update of RDF stores ● Product of W3C Process ● Submissions ● “members” ● Working groups ● Consensus (amongst the active participants) ● Widely implemented
  • 3. History 1.0 ● SPARQL 1.0 – Timescale: 2004 – 2008 ● 2 years late – Lots of choices for starting points – Controversies ● Syntax ● Named graphs ● Algebra
  • 4. SPARQL 1.0 Example @prefix person: <http://example/person/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . person:A foaf:name "Alice" . person:A foaf:mbox <mailto:alice@example.net> . person:B foaf:name "Bob" . PREFIX person: <http://example/person/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?n ?mailbox WHERE { person:A foaf:mbox ?mailbox ; foaf:name ?n . } ---------------------------------------- | n | mailbox | ======================================== | "Alice" | <mailto:alice@example.net> | ----------------------------------------
  • 5. SPARQL 1.0 Example @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix stock: <http://example.org/stock#> . stock:book1 dc:title "SPARQL Query Language Tutorial" . stock:book2 dc:title "SPARQL Query Language (2nd ed)" . stock:book3 dc:title "Moving from SQL to SPARQL" . stock:book4 dc:title "Applying XQuery" . PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX stock: <http://example.org/stock#> SELECT ?book ?title { ?book dc:title ?title . FILTER (regex(?title, "SPARQL")) } -------------------------------------------------- | book | title | ================================================== | stock:book3 | "Moving from SQL to SPARQL" | | stock:book2 | "SPARQL Query Language (2nd ed)" | | stock:book1 | "SPARQL Query Language Tutorial" | --------------------------------------------------
  • 6. SPARQL 1.0 ● Experimentation for new features started before the first standard was published – But you can't wait until “completely complete” ● Issues – Counting – Standard function library – Hard-to-use negation – Query only, no update – Only a “note” about a JSON output
  • 7. History 1.1 ● SPARQL 1.1 – Timescale : 2009 – 2013 ● 2 years late … – Controversies ● Negation ● Property paths ● Graphs … REST ...
  • 8. SPARQL 1.1 ● SPARQL 1.1 Query ● SPARQL 1.1 Update ● SPARQL 1.1 Protocol ● SPARQL 1.1 Graph Store Protocol ● SPARQL 1.1 Service Description ● SPARQL 1.1 Federated Query ● SPARQL 1.1 Query Results JSON Format ● SPARQL 1.1 Query Results CSV and TSV Formats ● SPARQL Query Results XML Format ● SPARQL 1.1 Entailment Regimes
  • 9. SPARQL 1.1 The important bits (IMO) ● SPARQL 1.1 Query – Subqueries, aggregation – negation – property paths – remote query ● SPARQL 1.1 Update ● SPARQL 1.1 Graph Store Protocol
  • 10. SPARQL 1.1 Query Examples PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name { { SELECT ?x (count(*) AS ?count) { ?x foaf:knows ?y . } GROUP BY ?x HAVING (?count = 3) } ?x foaf:name ?name . } PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?x { ?x rdf:type foaf:Person . FILTER NOT EXISTS { ?x foaf:name ?name } }
  • 11. Property Paths and Inference Class inference PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX : <http://example/> SELECT ?s { ?s rdf:type ?T . ?T rdfs:subClassOf* :SomeClass . } Property inference PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX : <http://example/> SELECT * { ?s ?p ?o . ?p rdfs:subPropertyOf* :property . }
  • 12. SPARQL 1.1 Update ● Fine grain graph manipulations – Act on a “graph store” – Add and remove graphs – Act on the contents of graphs – Quad centric ● LOAD, DROP, CREATE ● INSERT, DELETE – Data and patterns ● One request is multiple operations
  • 13. Data Operations PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> DELETE DATA { <http://example/abc> foaf:name "DEF" . } ; INSERT DATA { <http://example/abc> foaf:name "ABC" . } ;
  • 14. Pattern Operations : DELETE-INSERT Pattern → Delete triples → Insert triples PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX vc: <http://www.w3.org/2006/vcard/ns#> DELETE { ?p vc:fn ?x } INSERT { ?p foaf:name ?x } WHERE { ?p vc:fn ?x . ?p foaf:knows <http://example/#me> } }
  • 15. SPARQL 1.1 Graph Store Protocol ● Simple way to manage a store (RDF Dataset) ● GET, PUT, POST, DELETE ● Naming – Same server http://server/store/graph1 – Different server http://server/store?graph=http://example/g1 http://server/store?graph=http%3A//example/g1 http://server/store?default
  • 16. RESTful(ish) operation curl -T D.ttl --header 'Content-type: text/turtle' http://server.com/store?graph=http%3A//example/g1 PUT /store?graph=http%3A//example/g1 HTTP/1.1 Host: server.com Content-type: text/turtle @prefix : <http://example/> . :subject :pred1 1 ; :pred2 “hello” .
  • 17. Digression: RDF 1.1 ● Work-in-progress ● Incremental ● Turtle, TriG, N-Triples, N-Quads ● RDF Datasets (as SPARQL?) ● Related: JSON-LD
  • 18. JSON-LD ● Links and semantics for the JSON ecosystem ● Adds a "context" to map JSON to RDF ● RDF → JSON-LD → RDF is lossless { "@context": "http://json-ld.org/contexts/person.jsonld", "@id": "http://example.org/alice.foaf#me", "name": "Alice Hacker", "homepage": "http://example.org/alice", } @prefix foaf: <http://xmlns.com/foaf/0.1/> . <http://example.org/alice.foaf#me> foaf:name "Alice Hacker" ; foaf:homepage <http://example.org/alice> .
  • 20. Apache Jena ● Full Apache Project since May 2012 ● SPARQL 1.1 – Query – Update – Protocol – Graph Store Protocol
  • 21. Fuseki – SPARQL Server ● SPARQL server ● RDF native database – ACID transactions – Query timeout ● Deployed live
  • 22. Data Management ● Web UI ● curl / wget ● SOH (SPARQL over HTTP) – Scripts – s-get, s-put, s-post, s-delete, s-query, s-update
  • 23. Online ● http://www.sparql.org/ – Fuseki running on Apache project hardware ● Services – SPARQL query validator – SPARQL update validator – RDF data validator – IRI validator