SlideShare ist ein Scribd-Unternehmen logo
1 von 27
1
Twitter: @RobVesse
Email: rvesse@apache.org
2
 Software Engineer at YarcData, part of Cray Inc
 PMC Member and Committer on Apache Jena project
 Joined project in January 2012
 Can also be found hanging out on other Apache mailing
lists:
 Incubator General
 Giraph
 Marmotta
 Dev @ Community
 Interested in:
 Allthings Semantic Web, RDF and SPARQL
 Graphs (RDF or otherwise)
 Big Data particularly wrt. graphs
3
 Definitions
 Why JDBC for SPARQL?
 Introducing Jena JDBC
 Where can I getthis?
 What is it?
 Architecture
 Connection Strings
 Bridging the data model gap
 Fudging the metadata
 Supporting awkward tools
 Example Code
 Demo
 Alternative Options
4
 RDF
 Resource Description Framework
 W3C Standard for describing arbitrary data about resources
 SPARQL
 Recursive acronym-SPARQL Protocol and RDF Query Language
 Set of W3C standards for querying, updating and accessing RDF databases
 i.e. the SQL of the RDF database world
 JDBC
 JavaDatabase Connectivity
 Standard JavaAPIfor communicating with databases
 Part of the standard edition JavaRuntime
5
6
 Graph analytics is one of the hot topics in the Big
Data/Analytics world right now
 However most popular analytics tooling is primarily geared
around relational databases e.g.
 Pentaho
 Centrifuge
 QlikView
 Tableau
 etc.
 Often the database API of choice is JDBC
 Or ODBC
 Integrating SPARQL natively on a tool by tool basis is
arduous, limits code re-use and open sourcing
 May involve using semi-proprietary/restrictively licensed plugin APIs
 Implementing a JDBC driver lets people use SPARQL in any
JDBC supporting tool
7
8
 Available as part of the Apache Jena project from the 2.11.0
release onwards
 http://jena.apache.org
 NB - Not included in convenience binary packages
 Available via Maven
 http://jena.apache.org/documentation/jdbc/artifacts.html
 Group ID isorg.apache.jena
 Artifact IDs are of the formjena-jdbc-foowhere foois the specific module
 Current version for thesemodules is1.0.1
 Documentation on our website
 http://jena.apache.org/documentation/jdbc/index.html
9
 API Framework for building SPARQL over JDBC drivers
 JDBC 4.0 API compatibility
 Not JDBC 4.0 compliant
 JDBC Drivers for the major RDF/SPARQL back ends that
Jena supports
 In-Memory
 TDB
 Remote Endpoints
 Provides SPARQL over JDBC
 i.e. allows executing SPARQL queries through the JDBC API
 An uber-jar driver bundle that can be dropped into
applications to provide all the drivers and necessary
dependencies
1
0
Driver
Bundle
Driver
Implementations
Core API
1
1
 Provides high level abstract implementations of all the
infrastructure we need to implement a SPARQL over JDBC
driver e.g.
 Drivers
 Connections
 Metadata
 Statements
 Result Sets
 Data Typing
 Designed to be extensible and reused
 Most users won't need to know much about this
1
2
 One for each major RDF/SPARQL backend the Apache Jena
project supports
 These are the components most users care about
 In-Memory
 Non-persistent though may be initialized from a file on disk
 Usefulfor testing and prototyping
 Mavenartifact ID isjena-jdbc-driver-mem
 TDB
 Persistent disk backed RDF database
 Only driver that supports transactions
 Mavenartifact ID isjena-jdbc-driver-tdb
 Remote Endpoint
 Any RDF database that implements the SPARQL HTTP Protocol
 http://www.w3.org/TR/sparql11-protocol/
 Mavenartifact ID isjena-jdbc-driver-remote
 Bundle is a single convenience JAR containing all the drivers
 Mavenartifact ID isjena-jdbc-driver-bundle
1
3
jdbc:jena:mem:dataset=file.nq
jdbc:jena:mem:empty=true
jdbc:jena:tdb:location=/path/to/data
jdbc:jena:remote:query=http://localhost:3030/ds/query&update=http://localh
ost:3030/ds/update
 Jena JDBC drivers use a common jdbc:jena:foo: prefix
 Where foo is a driver specific prefix e.g. tdb
 Various implementation specific parameters plus some
general framework parameters e.g. jdbc-compatibility to
control data typing behaviour
 See documentation for fuller connection string reference:
 http://jena.apache.org/documentation/jdbc/drivers.html
1
4
 SPARQL has four query forms each with slightly different
results
 Need to make each fit JDBCs tabular result set API
 SELECT
 Tabular results- no translation necessary
 ASK
 Single boolean result - single column with single row
 CONSTRUCT/DESCRIBE
 RDF Graph result-represent the triples in tabular form
 i.e. table with 3columns- subject, predicate and object
1
5
 JDBC assumes uniform column typing
 Not true of SPARQL results
 We make the exact data typing behavior configurable
CC-BY-SA 3.0 - Wikimedia Commons
http://commons.wikimedia.org/wiki/File:Five_different_rubber_ducks.jpg
1
6
Public Domain - Wikimedia Commons -
http://commons.wikimedia.org/wiki/File:Butter_tablet_fudge.jpg
1
7
 Supported:
 Basic driver information
 Type information
 Function and keyword information
 SQL language support
 Result Set metadata
 Not Supported:
 Table and Procedure information
 Schema information
 There are alternative solutions that do support more
metadata but they represent a different architectural
approach to the problem
1
8
CC-BY-NC-SA 2.0 - rosipaw - http://www.flickr.com/photos/rosipaw/4643095630/
1
9
 API allows for adding both pre and post-request processors
to a connection
 Pre-processors can manipulate either the raw string or
parsed Query/Update as appropriate
 E.g.strip out extraneous syntaxtools might add
 Post-processors can manipulate the raw results before they
are returned
 E.g.rewrite variable namesto match what the toolexpect
2
0
2
1
// Open a Connection
Connection conn =
DriverManager.getConnection("jdbc:jena:tdb:location=/user/example/data/myd
b/");
// Prepare a Statement
PreparedStatement stmt = conn.prepareStatement("SELECT * WHERE { GRAPH ? {
?s ?p ?o } }");
stmt.setURL(1, new URL("http://example/graph"));
// Execute the Statement
ResultSet rset = stmt.executeQuery();
// Process the results...
// Clean up as normal
rset.close();
conn.close();
2
2
2
3
2
4
 Our approach is not the only one available as open source
 Two similar approaches to ours
 William Greenly's jdbc4sparql -http://code.google.com/p/jdbc4sparql/
 PaulGearon's scon -https://code.google.com/p/scon/wiki/Introduction
 An alternative approach is to map the RDF data into tables
and translate SQL queries into SPARQL queries behind the
scenes
 Claude Warren's jdbc4sparql -https://github.com/Claudenw/jdbc4sparql
2
5
Questions?
Twitter: @RobVesse
Email: rvesse@apache.org
2
6
Topic Link
Apache Jena Project http://jena.apache.org
RDF 1.1 Specification http://www.w3.org/TR/rdf11-concepts/
SPARQL 1.1 Specification http://www.w3.org/TR/sparql11-overview/
Jena JDBC Documentation http://jena.apache.org/documentation/jdbc/i
ndex.html
Jena JDBC Maven Artifacts Documentation http://jena.apache.org/documentation/jdbc/
artifacts.html
Jena JDBC Drivers Documentation -
Supported Drivers and Connection String
Parameters
http://jena.apache.org/documentation/jdbc/
drivers.html
SPARQL 1.1 Protocol http://www.w3.org/TR/sparql11-protocol/
2
7
Resource License Rightsholder URL
Square Peg
Round Hole
Image
CC-BY-SA-
NA 2.0
rosipaw http://www.flickr.com/photos/rosipaw/
4643095630/
Fudge Image Public
Domain
Wikimedia
Commons
http://commons.wikimedia.org/wiki/Fil
e:Butter_tablet_fudge.jpg
Rubber Ducks
Image
CC-BY-SA
3.0
Wikimedia
Commons
http://commons.wikimedia.org/wiki/Fil
e:Five_different_rubber_ducks.jpg

Weitere ähnliche Inhalte

Was ist angesagt?

Hadoop Performance Optimization at Scale, Lessons Learned at Twitter
Hadoop Performance Optimization at Scale, Lessons Learned at TwitterHadoop Performance Optimization at Scale, Lessons Learned at Twitter
Hadoop Performance Optimization at Scale, Lessons Learned at TwitterDataWorks Summit
 
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
 
Presto conferencetokyo2019
Presto conferencetokyo2019Presto conferencetokyo2019
Presto conferencetokyo2019wyukawa
 
Apache Pig: A big data processor
Apache Pig: A big data processorApache Pig: A big data processor
Apache Pig: A big data processorTushar B Kute
 
15 bufferand records
15 bufferand records15 bufferand records
15 bufferand recordsashish61_scs
 
Data Hacking with RHadoop
Data Hacking with RHadoopData Hacking with RHadoop
Data Hacking with RHadoopEd Kohlwey
 
Introduction to Hbase
Introduction to Hbase Introduction to Hbase
Introduction to Hbase Rupak Roy
 
11. From Hadoop to Spark 2/2
11. From Hadoop to Spark 2/211. From Hadoop to Spark 2/2
11. From Hadoop to Spark 2/2Fabio Fumarola
 
Hadoop 3 @ Hadoop Summit San Jose 2017
Hadoop 3 @ Hadoop Summit San Jose 2017Hadoop 3 @ Hadoop Summit San Jose 2017
Hadoop 3 @ Hadoop Summit San Jose 2017Junping Du
 
Querying Linked Data with SPARQL
Querying Linked Data with SPARQLQuerying Linked Data with SPARQL
Querying Linked Data with SPARQLOlaf Hartig
 
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817Ben Busby
 
Hadoop operations basic
Hadoop operations basicHadoop operations basic
Hadoop operations basicHafizur Rahman
 
ckan 2.0: Harvesting from other sources
ckan 2.0: Harvesting from other sourcesckan 2.0: Harvesting from other sources
ckan 2.0: Harvesting from other sourcesChengjen Lee
 
Apache hadoop, hdfs and map reduce Overview
Apache hadoop, hdfs and map reduce OverviewApache hadoop, hdfs and map reduce Overview
Apache hadoop, hdfs and map reduce OverviewNisanth Simon
 
Using R on High Performance Computers
Using R on High Performance ComputersUsing R on High Performance Computers
Using R on High Performance ComputersDave Hiltbrand
 
Real World Storage in Treasure Data
Real World Storage in Treasure DataReal World Storage in Treasure Data
Real World Storage in Treasure DataKai Sasaki
 

Was ist angesagt? (20)

Hadoop Performance Optimization at Scale, Lessons Learned at Twitter
Hadoop Performance Optimization at Scale, Lessons Learned at TwitterHadoop Performance Optimization at Scale, Lessons Learned at Twitter
Hadoop Performance Optimization at Scale, Lessons Learned at Twitter
 
Madrid SPARQL handson
Madrid SPARQL handsonMadrid SPARQL handson
Madrid SPARQL handson
 
Perl Programming - 04 Programming Database
Perl Programming - 04 Programming DatabasePerl Programming - 04 Programming Database
Perl Programming - 04 Programming Database
 
Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)
 
Presto conferencetokyo2019
Presto conferencetokyo2019Presto conferencetokyo2019
Presto conferencetokyo2019
 
Apache Pig: A big data processor
Apache Pig: A big data processorApache Pig: A big data processor
Apache Pig: A big data processor
 
Hadoop architecture by ajay
Hadoop architecture by ajayHadoop architecture by ajay
Hadoop architecture by ajay
 
15 bufferand records
15 bufferand records15 bufferand records
15 bufferand records
 
HDFS Internals
HDFS InternalsHDFS Internals
HDFS Internals
 
Data Hacking with RHadoop
Data Hacking with RHadoopData Hacking with RHadoop
Data Hacking with RHadoop
 
Introduction to Hbase
Introduction to Hbase Introduction to Hbase
Introduction to Hbase
 
11. From Hadoop to Spark 2/2
11. From Hadoop to Spark 2/211. From Hadoop to Spark 2/2
11. From Hadoop to Spark 2/2
 
Hadoop 3 @ Hadoop Summit San Jose 2017
Hadoop 3 @ Hadoop Summit San Jose 2017Hadoop 3 @ Hadoop Summit San Jose 2017
Hadoop 3 @ Hadoop Summit San Jose 2017
 
Querying Linked Data with SPARQL
Querying Linked Data with SPARQLQuerying Linked Data with SPARQL
Querying Linked Data with SPARQL
 
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817
 
Hadoop operations basic
Hadoop operations basicHadoop operations basic
Hadoop operations basic
 
ckan 2.0: Harvesting from other sources
ckan 2.0: Harvesting from other sourcesckan 2.0: Harvesting from other sources
ckan 2.0: Harvesting from other sources
 
Apache hadoop, hdfs and map reduce Overview
Apache hadoop, hdfs and map reduce OverviewApache hadoop, hdfs and map reduce Overview
Apache hadoop, hdfs and map reduce Overview
 
Using R on High Performance Computers
Using R on High Performance ComputersUsing R on High Performance Computers
Using R on High Performance Computers
 
Real World Storage in Treasure Data
Real World Storage in Treasure DataReal World Storage in Treasure Data
Real World Storage in Treasure Data
 

Ähnlich wie Introducing JDBC for SPARQL

Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3Oracle
 
Comparative Study That Aims Rdf Processing For The Java Platform
Comparative Study That Aims Rdf Processing For The Java PlatformComparative Study That Aims Rdf Processing For The Java Platform
Comparative Study That Aims Rdf Processing For The Java PlatformComputer Science
 
RDF_API_Java_Stefan_Apostoaie
RDF_API_Java_Stefan_ApostoaieRDF_API_Java_Stefan_Apostoaie
RDF_API_Java_Stefan_Apostoaieiosstef
 
1. java database connectivity (jdbc)
1. java database connectivity (jdbc)1. java database connectivity (jdbc)
1. java database connectivity (jdbc)Fad Zulkifli
 
Starschema Products
Starschema ProductsStarschema Products
Starschema ProductsEndre Adam
 
3.java database connectivity
3.java database connectivity3.java database connectivity
3.java database connectivityweb360
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsmichaelaaron25322
 
EKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern FragmentsEKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern FragmentsRuben Taelman
 

Ähnlich wie Introducing JDBC for SPARQL (20)

Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
 
LOD2: State of Play WP6 - LOD2 Stack Architecture
LOD2: State of Play WP6 - LOD2 Stack ArchitectureLOD2: State of Play WP6 - LOD2 Stack Architecture
LOD2: State of Play WP6 - LOD2 Stack Architecture
 
Jdbc complete
Jdbc completeJdbc complete
Jdbc complete
 
Jdbc introduction
Jdbc introductionJdbc introduction
Jdbc introduction
 
Comparative Study That Aims Rdf Processing For The Java Platform
Comparative Study That Aims Rdf Processing For The Java PlatformComparative Study That Aims Rdf Processing For The Java Platform
Comparative Study That Aims Rdf Processing For The Java Platform
 
RDF_API_Java_Stefan_Apostoaie
RDF_API_Java_Stefan_ApostoaieRDF_API_Java_Stefan_Apostoaie
RDF_API_Java_Stefan_Apostoaie
 
Spark Workshop
Spark WorkshopSpark Workshop
Spark Workshop
 
1. java database connectivity (jdbc)
1. java database connectivity (jdbc)1. java database connectivity (jdbc)
1. java database connectivity (jdbc)
 
Starschema Products
Starschema ProductsStarschema Products
Starschema Products
 
DavidWible_res
DavidWible_resDavidWible_res
DavidWible_res
 
3.java database connectivity
3.java database connectivity3.java database connectivity
3.java database connectivity
 
Apache Spark Fundamentals Training
Apache Spark Fundamentals TrainingApache Spark Fundamentals Training
Apache Spark Fundamentals Training
 
Apache Marmotta - Introduction
Apache Marmotta - IntroductionApache Marmotta - Introduction
Apache Marmotta - Introduction
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Spark
SparkSpark
Spark
 
Core jdbc basics
Core jdbc basicsCore jdbc basics
Core jdbc basics
 
Prashanthi
PrashanthiPrashanthi
Prashanthi
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applications
 
.NET RDF APIs
.NET RDF APIs.NET RDF APIs
.NET RDF APIs
 
EKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern FragmentsEKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern Fragments
 

Mehr von Rob Vesse

Challenges and patterns for semantics at scale
Challenges and patterns for semantics at scaleChallenges and patterns for semantics at scale
Challenges and patterns for semantics at scaleRob Vesse
 
Apache Jena Elephas and Friends
Apache Jena Elephas and FriendsApache Jena Elephas and Friends
Apache Jena Elephas and FriendsRob Vesse
 
Quadrupling your elephants - RDF and the Hadoop ecosystem
Quadrupling your elephants - RDF and the Hadoop ecosystemQuadrupling your elephants - RDF and the Hadoop ecosystem
Quadrupling your elephants - RDF and the Hadoop ecosystemRob Vesse
 
Practical SPARQL Benchmarking Revisited
Practical SPARQL Benchmarking RevisitedPractical SPARQL Benchmarking Revisited
Practical SPARQL Benchmarking RevisitedRob Vesse
 
Practical SPARQL Benchmarking
Practical SPARQL BenchmarkingPractical SPARQL Benchmarking
Practical SPARQL BenchmarkingRob Vesse
 
Everyday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperEveryday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperRob Vesse
 
Everyday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperEveryday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperRob Vesse
 
dotNetRDF - A Semantic Web/RDF Library for .Net Developers
dotNetRDF - A Semantic Web/RDF Library for .Net DevelopersdotNetRDF - A Semantic Web/RDF Library for .Net Developers
dotNetRDF - A Semantic Web/RDF Library for .Net DevelopersRob Vesse
 

Mehr von Rob Vesse (8)

Challenges and patterns for semantics at scale
Challenges and patterns for semantics at scaleChallenges and patterns for semantics at scale
Challenges and patterns for semantics at scale
 
Apache Jena Elephas and Friends
Apache Jena Elephas and FriendsApache Jena Elephas and Friends
Apache Jena Elephas and Friends
 
Quadrupling your elephants - RDF and the Hadoop ecosystem
Quadrupling your elephants - RDF and the Hadoop ecosystemQuadrupling your elephants - RDF and the Hadoop ecosystem
Quadrupling your elephants - RDF and the Hadoop ecosystem
 
Practical SPARQL Benchmarking Revisited
Practical SPARQL Benchmarking RevisitedPractical SPARQL Benchmarking Revisited
Practical SPARQL Benchmarking Revisited
 
Practical SPARQL Benchmarking
Practical SPARQL BenchmarkingPractical SPARQL Benchmarking
Practical SPARQL Benchmarking
 
Everyday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperEveryday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web Developer
 
Everyday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperEveryday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web Developer
 
dotNetRDF - A Semantic Web/RDF Library for .Net Developers
dotNetRDF - A Semantic Web/RDF Library for .Net DevelopersdotNetRDF - A Semantic Web/RDF Library for .Net Developers
dotNetRDF - A Semantic Web/RDF Library for .Net Developers
 

Kürzlich hochgeladen

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Kürzlich hochgeladen (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Introducing JDBC for SPARQL

  • 2. 2  Software Engineer at YarcData, part of Cray Inc  PMC Member and Committer on Apache Jena project  Joined project in January 2012  Can also be found hanging out on other Apache mailing lists:  Incubator General  Giraph  Marmotta  Dev @ Community  Interested in:  Allthings Semantic Web, RDF and SPARQL  Graphs (RDF or otherwise)  Big Data particularly wrt. graphs
  • 3. 3  Definitions  Why JDBC for SPARQL?  Introducing Jena JDBC  Where can I getthis?  What is it?  Architecture  Connection Strings  Bridging the data model gap  Fudging the metadata  Supporting awkward tools  Example Code  Demo  Alternative Options
  • 4. 4  RDF  Resource Description Framework  W3C Standard for describing arbitrary data about resources  SPARQL  Recursive acronym-SPARQL Protocol and RDF Query Language  Set of W3C standards for querying, updating and accessing RDF databases  i.e. the SQL of the RDF database world  JDBC  JavaDatabase Connectivity  Standard JavaAPIfor communicating with databases  Part of the standard edition JavaRuntime
  • 5. 5
  • 6. 6  Graph analytics is one of the hot topics in the Big Data/Analytics world right now  However most popular analytics tooling is primarily geared around relational databases e.g.  Pentaho  Centrifuge  QlikView  Tableau  etc.  Often the database API of choice is JDBC  Or ODBC  Integrating SPARQL natively on a tool by tool basis is arduous, limits code re-use and open sourcing  May involve using semi-proprietary/restrictively licensed plugin APIs  Implementing a JDBC driver lets people use SPARQL in any JDBC supporting tool
  • 7. 7
  • 8. 8  Available as part of the Apache Jena project from the 2.11.0 release onwards  http://jena.apache.org  NB - Not included in convenience binary packages  Available via Maven  http://jena.apache.org/documentation/jdbc/artifacts.html  Group ID isorg.apache.jena  Artifact IDs are of the formjena-jdbc-foowhere foois the specific module  Current version for thesemodules is1.0.1  Documentation on our website  http://jena.apache.org/documentation/jdbc/index.html
  • 9. 9  API Framework for building SPARQL over JDBC drivers  JDBC 4.0 API compatibility  Not JDBC 4.0 compliant  JDBC Drivers for the major RDF/SPARQL back ends that Jena supports  In-Memory  TDB  Remote Endpoints  Provides SPARQL over JDBC  i.e. allows executing SPARQL queries through the JDBC API  An uber-jar driver bundle that can be dropped into applications to provide all the drivers and necessary dependencies
  • 11. 1 1  Provides high level abstract implementations of all the infrastructure we need to implement a SPARQL over JDBC driver e.g.  Drivers  Connections  Metadata  Statements  Result Sets  Data Typing  Designed to be extensible and reused  Most users won't need to know much about this
  • 12. 1 2  One for each major RDF/SPARQL backend the Apache Jena project supports  These are the components most users care about  In-Memory  Non-persistent though may be initialized from a file on disk  Usefulfor testing and prototyping  Mavenartifact ID isjena-jdbc-driver-mem  TDB  Persistent disk backed RDF database  Only driver that supports transactions  Mavenartifact ID isjena-jdbc-driver-tdb  Remote Endpoint  Any RDF database that implements the SPARQL HTTP Protocol  http://www.w3.org/TR/sparql11-protocol/  Mavenartifact ID isjena-jdbc-driver-remote  Bundle is a single convenience JAR containing all the drivers  Mavenartifact ID isjena-jdbc-driver-bundle
  • 13. 1 3 jdbc:jena:mem:dataset=file.nq jdbc:jena:mem:empty=true jdbc:jena:tdb:location=/path/to/data jdbc:jena:remote:query=http://localhost:3030/ds/query&update=http://localh ost:3030/ds/update  Jena JDBC drivers use a common jdbc:jena:foo: prefix  Where foo is a driver specific prefix e.g. tdb  Various implementation specific parameters plus some general framework parameters e.g. jdbc-compatibility to control data typing behaviour  See documentation for fuller connection string reference:  http://jena.apache.org/documentation/jdbc/drivers.html
  • 14. 1 4  SPARQL has four query forms each with slightly different results  Need to make each fit JDBCs tabular result set API  SELECT  Tabular results- no translation necessary  ASK  Single boolean result - single column with single row  CONSTRUCT/DESCRIBE  RDF Graph result-represent the triples in tabular form  i.e. table with 3columns- subject, predicate and object
  • 15. 1 5  JDBC assumes uniform column typing  Not true of SPARQL results  We make the exact data typing behavior configurable CC-BY-SA 3.0 - Wikimedia Commons http://commons.wikimedia.org/wiki/File:Five_different_rubber_ducks.jpg
  • 16. 1 6 Public Domain - Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Butter_tablet_fudge.jpg
  • 17. 1 7  Supported:  Basic driver information  Type information  Function and keyword information  SQL language support  Result Set metadata  Not Supported:  Table and Procedure information  Schema information  There are alternative solutions that do support more metadata but they represent a different architectural approach to the problem
  • 18. 1 8 CC-BY-NC-SA 2.0 - rosipaw - http://www.flickr.com/photos/rosipaw/4643095630/
  • 19. 1 9  API allows for adding both pre and post-request processors to a connection  Pre-processors can manipulate either the raw string or parsed Query/Update as appropriate  E.g.strip out extraneous syntaxtools might add  Post-processors can manipulate the raw results before they are returned  E.g.rewrite variable namesto match what the toolexpect
  • 20. 2 0
  • 21. 2 1 // Open a Connection Connection conn = DriverManager.getConnection("jdbc:jena:tdb:location=/user/example/data/myd b/"); // Prepare a Statement PreparedStatement stmt = conn.prepareStatement("SELECT * WHERE { GRAPH ? { ?s ?p ?o } }"); stmt.setURL(1, new URL("http://example/graph")); // Execute the Statement ResultSet rset = stmt.executeQuery(); // Process the results... // Clean up as normal rset.close(); conn.close();
  • 22. 2 2
  • 23. 2 3
  • 24. 2 4  Our approach is not the only one available as open source  Two similar approaches to ours  William Greenly's jdbc4sparql -http://code.google.com/p/jdbc4sparql/  PaulGearon's scon -https://code.google.com/p/scon/wiki/Introduction  An alternative approach is to map the RDF data into tables and translate SQL queries into SPARQL queries behind the scenes  Claude Warren's jdbc4sparql -https://github.com/Claudenw/jdbc4sparql
  • 26. 2 6 Topic Link Apache Jena Project http://jena.apache.org RDF 1.1 Specification http://www.w3.org/TR/rdf11-concepts/ SPARQL 1.1 Specification http://www.w3.org/TR/sparql11-overview/ Jena JDBC Documentation http://jena.apache.org/documentation/jdbc/i ndex.html Jena JDBC Maven Artifacts Documentation http://jena.apache.org/documentation/jdbc/ artifacts.html Jena JDBC Drivers Documentation - Supported Drivers and Connection String Parameters http://jena.apache.org/documentation/jdbc/ drivers.html SPARQL 1.1 Protocol http://www.w3.org/TR/sparql11-protocol/
  • 27. 2 7 Resource License Rightsholder URL Square Peg Round Hole Image CC-BY-SA- NA 2.0 rosipaw http://www.flickr.com/photos/rosipaw/ 4643095630/ Fudge Image Public Domain Wikimedia Commons http://commons.wikimedia.org/wiki/Fil e:Butter_tablet_fudge.jpg Rubber Ducks Image CC-BY-SA 3.0 Wikimedia Commons http://commons.wikimedia.org/wiki/Fil e:Five_different_rubber_ducks.jpg