SlideShare a Scribd company logo
RESTful writable APIs
for the web of Linked
 Data using relational
  storage solutions

       Antonio Garrote
     María N.Moreno García
Outline

1. Introduction
2. SPARQL to SQL mapping using R2RML
3. RESTful API
4. Conclusions
Web APIs

              OAuth
                                       Key Value
Mobile App.                              Store
                      HTTP
                       API



 JS. App      JSON               MVC




Native App.

                      Dynamic          Relational
                      Web App.            DB
Linked data APIs?

• RDF data model vs JSON objects
• Object IDs vs URIs
• Properties identified by URIs vs plain
  strings
• URIs linking data in different services
Transition path

• Translation of SPARQL update queries into
  SQL queries
• RDF graphs encoded in JSON objects
• RESTful protocol to manipulate RDF graphs
SPARQL to SQL
        translation

• R2RML starting point
                                Relational
  RDF quads     TableMappings
                                  Data




                   R2RML
                  Document
SPARQL to SQL
           translation
• inverse transformation
                    R2RML
                   Document

  SPARQL
   Query



QuadPatterns     QuadMatchers   SQL
SPARQL to SQL
            translation

          Constant
          Mappings


R2RML
Mapping
                     (Table, Subject, Property, Object, Graph)

          Variable
          Mappings
                               Quad Matchers
SPARQL to SQL
                 translation

(Table, Subject, Property, Object, Graph)
                                             Constant
                                              Terms




             Compatible?                                  SPARQL
                                                         Quad Pattern



                                             Variables
                                            +BNode IDs
SPARQL to SQL
           translation
SELECT                   SPARQL
                        Quad Pattern




           Quad            Quad             Quad
          Matcher         Matcher          Matcher




         σπ             σπ                 σπ
                    ∪                  ∪
          SPARQL Relational Algebra
SPARQL to SQL
           translation
Insert                 SPARQL
                      Quad Pattern




            Quad         Quad         Quad
           Matcher      Matcher      Matcher




            Min. Insertion Cost metric


         Insert / Update SQL DM Query
SPARQL to SQL
           translation
• Different compatibility functions: data types,
  language tags in literals
• R2RML extensions to generate IDs from
  URIs
• Limitations: auto increment columns and
  database constraints
RESTful API

• Starting point: “SPARQL 1.1 Uniform HTTP
  Protocol for Managing RDF graphs”
• Granularity: RDF named graph
• HTTP uniform interface semantics
RESTful API

• Declarative definition of APIs (RDFS
  vocabulary)
 -   URI templates
 -   Mapping of templates to SPARQL
     endpoints
RESTful API
• Minting of resource URIs
          HTTP POST Request                       HTTP GET Response
                                                                       graph_uri


             [
             <p1> <o1> ;
                                                        <uri>              graph_uri#self
                                                        <p1> <o1> ;
             <p2> <o2>;
                                                        <p2> <o2>;
             ...
                                                        ...
             ]
                      RDF                                        RDF


                                                  200




                              201


                               New resource URI
RESTful API
• Extensions (linked-data-api):
 - JSON-LD as the primary media type
 - Method overloading
 - JSONP support
 - Format URL parameter
 - Pagination parameters
Sample Application
• Library
• Prototype
 - JavaScript client
 - RESTful API
 - FOAF+SSL auth
 - Relational backend
      http://github.com/antoniogarrote/clj-r2rml
         http://antoniogarrote.com/cvbuilder
Conclusions
• Linked data and sem. web technologies can
  help us to build better web APIs
• Huge opportunity to increase the amount
  of linked data available in the web
• Real benefits for end users
• Easy transition path for web developers
  must be provided

More Related Content

PPTX
Semantic web for ontology chapter4 bynk
PPTX
Practical Cross-Dataset Queries with SPARQL (Introduction)
PDF
Introduction to Spark 2.0 Dataset API
PDF
Interactive workflow management using Azkaban
PDF
Cassandra Community Webinar: Apache Spark Analytics at The Weather Channel - ...
PDF
Anatomy of Data Frame API : A deep dive into Spark Data Frame API
PDF
Anatomy of spark catalyst
PDF
RDF Database-as-a-Service with S4
Semantic web for ontology chapter4 bynk
Practical Cross-Dataset Queries with SPARQL (Introduction)
Introduction to Spark 2.0 Dataset API
Interactive workflow management using Azkaban
Cassandra Community Webinar: Apache Spark Analytics at The Weather Channel - ...
Anatomy of Data Frame API : A deep dive into Spark Data Frame API
Anatomy of spark catalyst
RDF Database-as-a-Service with S4

What's hot (20)

PDF
SparkR: Enabling Interactive Data Science at Scale
PPTX
Introduction to Spark - DataFactZ
PPTX
Introduction to GraphQL
PDF
JugMarche: Neo4j 2 (Cypher)
PDF
Introduction to dataset
PPTX
SPARQL and Linked Data Benchmarking
PDF
Anatomy of Data Source API : A deep dive into Spark Data source API
PDF
Automobile Route Matching with Dynamic Time Warping Using PySpark with Cather...
PDF
Introduction to Spark R with R studio - Mr. Pragith
PDF
Approaching graph db
PDF
Building end to end streaming application on Spark
PPTX
Spark Sql for Training
PDF
Learning spark ch01 - Introduction to Data Analysis with Spark
PDF
Spark SQL - 10 Things You Need to Know
PDF
Introduction to spark 2.0
PDF
Spark DataFrames and ML Pipelines
PDF
Eclipse RDF4J - Working with RDF in Java
PDF
Introduction to Datasource V2 API
PPTX
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)
PDF
Real time ETL processing using Spark streaming
SparkR: Enabling Interactive Data Science at Scale
Introduction to Spark - DataFactZ
Introduction to GraphQL
JugMarche: Neo4j 2 (Cypher)
Introduction to dataset
SPARQL and Linked Data Benchmarking
Anatomy of Data Source API : A deep dive into Spark Data source API
Automobile Route Matching with Dynamic Time Warping Using PySpark with Cather...
Introduction to Spark R with R studio - Mr. Pragith
Approaching graph db
Building end to end streaming application on Spark
Spark Sql for Training
Learning spark ch01 - Introduction to Data Analysis with Spark
Spark SQL - 10 Things You Need to Know
Introduction to spark 2.0
Spark DataFrames and ML Pipelines
Eclipse RDF4J - Working with RDF in Java
Introduction to Datasource V2 API
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)
Real time ETL processing using Spark streaming
Ad

Viewers also liked (6)

PPTX
A Big, Fast and Persistent Queue
PDF
Infinum Android Talks #05 - Square tape
PDF
4th European Lisp Symposium: Jobim: an Actors Library for the Clojure Program...
PDF
The State Machine Compiler
PDF
Linked Data APIs (Funding Circle May 2015)
PDF
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
A Big, Fast and Persistent Queue
Infinum Android Talks #05 - Square tape
4th European Lisp Symposium: Jobim: an Actors Library for the Clojure Program...
The State Machine Compiler
Linked Data APIs (Funding Circle May 2015)
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
Ad

Similar to RESTful writable APIs for the web of Linked Data using relational storage solutions (20)

PDF
Ivan Herman - Semantic Web Activities @ W3C
PPTX
Semantic Web and Related Work at W3C
PDF
SPARQL and Linked Data
PDF
RDF Seminar Presentation
PDF
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
PDF
Web standards, why care?
PPTX
Data Integration at the Ontology Engineering Group
PDF
RDF Tutorial - SPARQL 20091031
PPTX
Introduction to dotNetRDF
PDF
REST and Linked Data: a match made for domain driven development?
KEY
Creating web applications with LODSPeaKr
PPTX
Consuming Linked Data 4/5 Semtech2011
PDF
A Hands On Overview Of The Semantic Web
KEY
Linked services
ODP
Semantic Web introduction
PPTX
Marklogic and the Linked Data Connection
PDF
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
PDF
ISWC GoodRelations Tutorial Part 4
PDF
GoodRelations Tutorial Part 4
PDF
Transforming Your Data with GraphDB: GraphDB Fundamentals, Jan 2018
Ivan Herman - Semantic Web Activities @ W3C
Semantic Web and Related Work at W3C
SPARQL and Linked Data
RDF Seminar Presentation
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
Web standards, why care?
Data Integration at the Ontology Engineering Group
RDF Tutorial - SPARQL 20091031
Introduction to dotNetRDF
REST and Linked Data: a match made for domain driven development?
Creating web applications with LODSPeaKr
Consuming Linked Data 4/5 Semtech2011
A Hands On Overview Of The Semantic Web
Linked services
Semantic Web introduction
Marklogic and the Linked Data Connection
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
ISWC GoodRelations Tutorial Part 4
GoodRelations Tutorial Part 4
Transforming Your Data with GraphDB: GraphDB Fundamentals, Jan 2018

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Modernizing your data center with Dell and AMD
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
Teaching material agriculture food technology
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
A Presentation on Artificial Intelligence
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Network Security Unit 5.pdf for BCA BBA.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
NewMind AI Monthly Chronicles - July 2025
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Modernizing your data center with Dell and AMD
Reach Out and Touch Someone: Haptics and Empathic Computing
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Per capita expenditure prediction using model stacking based on satellite ima...
Teaching material agriculture food technology
CIFDAQ's Market Insight: SEC Turns Pro Crypto
A Presentation on Artificial Intelligence
“AI and Expert System Decision Support & Business Intelligence Systems”
Digital-Transformation-Roadmap-for-Companies.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

RESTful writable APIs for the web of Linked Data using relational storage solutions

  • 1. RESTful writable APIs for the web of Linked Data using relational storage solutions Antonio Garrote María N.Moreno García
  • 2. Outline 1. Introduction 2. SPARQL to SQL mapping using R2RML 3. RESTful API 4. Conclusions
  • 3. Web APIs OAuth Key Value Mobile App. Store HTTP API JS. App JSON MVC Native App. Dynamic Relational Web App. DB
  • 4. Linked data APIs? • RDF data model vs JSON objects • Object IDs vs URIs • Properties identified by URIs vs plain strings • URIs linking data in different services
  • 5. Transition path • Translation of SPARQL update queries into SQL queries • RDF graphs encoded in JSON objects • RESTful protocol to manipulate RDF graphs
  • 6. SPARQL to SQL translation • R2RML starting point Relational RDF quads TableMappings Data R2RML Document
  • 7. SPARQL to SQL translation • inverse transformation R2RML Document SPARQL Query QuadPatterns QuadMatchers SQL
  • 8. SPARQL to SQL translation Constant Mappings R2RML Mapping (Table, Subject, Property, Object, Graph) Variable Mappings Quad Matchers
  • 9. SPARQL to SQL translation (Table, Subject, Property, Object, Graph) Constant Terms Compatible? SPARQL Quad Pattern Variables +BNode IDs
  • 10. SPARQL to SQL translation SELECT SPARQL Quad Pattern Quad Quad Quad Matcher Matcher Matcher σπ σπ σπ ∪ ∪ SPARQL Relational Algebra
  • 11. SPARQL to SQL translation Insert SPARQL Quad Pattern Quad Quad Quad Matcher Matcher Matcher Min. Insertion Cost metric Insert / Update SQL DM Query
  • 12. SPARQL to SQL translation • Different compatibility functions: data types, language tags in literals • R2RML extensions to generate IDs from URIs • Limitations: auto increment columns and database constraints
  • 13. RESTful API • Starting point: “SPARQL 1.1 Uniform HTTP Protocol for Managing RDF graphs” • Granularity: RDF named graph • HTTP uniform interface semantics
  • 14. RESTful API • Declarative definition of APIs (RDFS vocabulary) - URI templates - Mapping of templates to SPARQL endpoints
  • 15. RESTful API • Minting of resource URIs HTTP POST Request HTTP GET Response graph_uri [ <p1> <o1> ; <uri> graph_uri#self <p1> <o1> ; <p2> <o2>; <p2> <o2>; ... ... ] RDF RDF 200 201 New resource URI
  • 16. RESTful API • Extensions (linked-data-api): - JSON-LD as the primary media type - Method overloading - JSONP support - Format URL parameter - Pagination parameters
  • 17. Sample Application • Library • Prototype - JavaScript client - RESTful API - FOAF+SSL auth - Relational backend http://github.com/antoniogarrote/clj-r2rml http://antoniogarrote.com/cvbuilder
  • 18. Conclusions • Linked data and sem. web technologies can help us to build better web APIs • Huge opportunity to increase the amount of linked data available in the web • Real benefits for end users • Easy transition path for web developers must be provided