SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
1
Franck Michel
A Mapping-based Method to Query
MongoDB Documents with SPARQL
F. Michel, C. Faron-Zucker, J. Montagnat
Université Côte d’Azur, CNRS, Inria, I3S, France
2
Franck Michel
Towards a Web of Data
From a Web of Documents
...to a Web of (Linked) Data
Interlinking of open datasets
in a common machine-readable format,
using common vocabularies
3
Franck Michel
Web-scale data integration
Exponential data growth
Heterogeneous data sources
Knowledge formalized as
Domain Ontologies, Thesauri,
Taxonomies…
A Web of
Linked Open Data
NoSQL: huge potential source of Linked Open Data,
yet largely ignored/despised so far
ID NAME
4
Franck Michel
Populate
the
Web of Data
with
Legacy Data
5
Franck Michel
Common Approaches
Legacy DB
Graph
Materialization
(ETL like)
Virtual Graph
Data freshness
Big datasets
DB-to-RDF
Mappings
Query
rewriting
6
Franck Michel
SPARQL Access to Heterogeneous DBs
Previous SPARQL rewritings closely coupled with the
target QL expressiveness (SQL, XQuery):
• Support of joins, unions, nested queries, filtering, string fctn, etc.
• Semantics-preserving 1-to-1 rewriting
How not to define yet another
rewriting method for each DB?
Two-step approach to deal with the general case [3]:
1. Translate SPARQL into a pivot Abstract Query Language (AQL)
under DB-to-RDF mappings, with no assumption on the target DB capabilities
2. Translate from the AQL to the QL of the target database
7
Franck Michel
Agenda
Previous episodes
Generalized mapping language: xR2RML
SPARQL-to-AQL Rewriting
AQL-to-MongoDB Rewriting
Conclusions & Perspectives
8
Franck Michel
Agenda
Previous episodes
Generalized mapping language: xR2RML
SPARQL-to-AQL Rewriting
AQL-to-MongoDB Rewriting
Conclusions & Perspectives
9
Franck Michel
The xR2RML mapping language [1]
 Extends W3C R2RML and RML
 Describe mappings from various types of DB to RDF
• Query the target database
• Pick data elements from query results
• Translate them to (subject, predicate, object) using arbitrary ontologies
 Independent of any target database
• Allow any query language
• Allow any syntax to reference data elements within query results
(column name, JSONPath, XPath, attribute name...)
10
Franck Michel
The xR2RML mapping language: example
<http://example.org/member/106> foaf:mbox "john@foo.com".
<http://example.org/member/106> foaf:mbox "john@example.org".
<#Mbox> a rr:TriplesMap;
xrr:logicalSource [ xrr:query "db.people.find({'emails':{$ne: null}})" ];
rr:subjectMap [ rr:template "http://example.org/member/{$.id}" ];
rr:predicateObjectMap [
rr:predicate foaf:mbox;
rr:objectMap [ xrr:reference "$.emails.*" ].
xR2RML
{
"id": 106, "firstname": "John",
"emails": ["john@foo.com", "john@example.org"]
}
11
Franck Michel
Graph Pattern
SPARQL-to-AQL rewriting [3]
Basic Graph Pattern
SELECT ?mbox WHERE {
?x foaf:mbox "john@foo.com".
?x foaf:mbox ?mbox.
FILTER { ?mbox != "john@foo.com"}
}
Triple Pattern
Rewrite a well-designed SPARQL graph pattern
into an optimized Abstract Query, under a set of
xR2RML mappings.
In turn, it should be possible to translate the
Abstract Query into “any” target database QL.
12
Franck Michel
SPARQL-to-AQL rewriting in one slide!
SELECT ?mbox WHERE {
?x foaf:mbox "john@foo.com".
?x foaf:mbox ?mbox.
FILTER { ?mbox != "john@foo.com" }
}
{ From: { "db.people.find({'emails':{$ne:null}})" },
Project: { $.id AS ?x },
Where: { isNotNull($.id), equals($.emails.*, "john@foo.com")}}
INNER JOIN
{ From: { "db.people.find({'emails':{$ne: null}})" },
Project: { $.id AS ?x , $.emails.* AS ?mbox },
Where: { isNotNull($.id), isNotNull($.emails.*), sparqlFilter(?mbox != "john@foo.com")}}
ON { ?x } Abstract Query
<#Mbox> a rr:TriplesMap;
xrr:logicalSource [ xrr:query "db.people.find({'emails':{$ne: null}})" ];
rr:subjectMap [ rr:template "http://example.org/member/{$.id}" ];
rr:predicateObjectMap [
rr:predicate foaf:mbox;
rr:objectMap [ xrr:reference "$.emails.*" ].
xR2RML mapping
Self-join
13
Franck Michel
Agenda
Previous episodes
Generalized mapping language: xR2RML
SPARQL-to-AQL Rewriting
AQL-to-MongoDB Rewriting
Conclusions & Perspectives
14
Franck Michel
Why MongoDB?
Sources: db-engines.com
Popularity measure:
Number of results in search engines,
Google Trends, frequency of technical
discussions, job offers, profiles in
professional networks, number of tweets
15
Franck Michel
Why MongoDB?
 MongoDB: very popular NoSQL database today
 (Probably) increasingly adopted as a general-purpose DB
• Long tail of scientific data?
 Non-tabular format
• E.g. with Cassandra, a regular SQL-to-RDF would “almost” do the job
A good candidate to experiment what
it takes to publish NoSQL data into
the Web of Linked Open Data
16
Franck Michel
MongoDB Query Language
 Find queries
Declarative retrieval of doc. matching criteria
db.people.find({"age":{$gt: 30}}, {"code":1})
Limitations:
no join, restrictions on union and nested queries, limited comparisons
 Aggregate queries
• Definition of processing pipelines:
• project, match, lookup, unwind, …
• Richer than find queries
• But more difficult to anticipate performance
 We consider find queries in a first approach
17
Franck Michel
SPARQL to MongoDB query rewriting
Rewrite
SPARQL
Query
Abstract
Query
xR2RML
mapping
AQL Operators:
INNER JOIN ON
LEFT JOIN ON
UNION
FILTER
LIMIT
Atomic AQ:
From: concrete MongoDB query
Where: conditions on JSONPath expressions
isNotNull, equals, sparqlFilter, OR, AND
18
Franck Michel
AQL Operators:
INNER JOIN ON
LEFT JOIN ON
UNION
FILTER
LIMIT
Atomic AQ:
From: concrete MongoDB query
Where: conditions on JSONPath expressions
isNotNull, equals, sparqlFilter, OR, AND
SPARQL to MongoDB query rewriting
Rewrite
SPARQL
Query
Abstract
Query
xR2RML
mapping
AQL Operators:
INNER JOIN ON
LEFT JOIN ON
UNION: $or as root of a query document
FILTER: restrictions (no field comp.), perf. ($where)
LIMIT
Atomic AQ:
From: concrete MongoDB query
Where: conditions on JSONPath expressions
isNotNull, equals, sparqlFilter, OR, AND
19
Franck Michel
SPARQL to MongoDB query rewriting
Rewrite
SPARQL
Query
Abstract
Query
xR2RML
mapping
AQL Operators:
INNER JOIN ON
LEFT JOIN ON
UNION: $or as root of a query document
FILTER: restrictions (no field comp.), perf. ($where)
LIMIT
Atomic AQ:
From: concrete MongoDB query
Where: conditions on JSONPath expressions
isNotNull, equals, sparqlFilter, OR, AND
Query Processing Engine
Query
Processing
Engine
processing burden
20
Franck Michel
SPARQL to MongoDB query rewriting
Rewrite
SPARQL
Query
Abstract
Query
xR2RML
mapping
Translate each atomic AQ
Optimize/Rewrite
AQL Operators:
INNER JOIN ON
LEFT JOIN ON
UNION
FILTER
LIMIT
Conditions on JSONPath expressions
translated into MongoDB operators
Atomic AQ:
From: concrete MongoDB query
Where: conditions on JSONPath
expressions
Concrete
MongoDB
Query
Abstract
MongoDB
Query
Query
Processing
Engine
21
Franck Michel
Condition on JSONPath expression - to - MongoDB QL
 Example query
isNotNull($.id)
→ "id": {$exists:true, $ne:null}
equals($.emails.*, "john@foo.com")
→ "emails": {$elemMatch: {$eq:"john@foo.com"}}
 Field alternative
equals($.p.["q", "r"], 10)
→ $or: [ {"p.q":{$eq: 10}}, {"p.r":{$eq: 10}} ]
 JavaScript calculated array index
equals($.staff[(@.length - 1)].name, "John")
→ $and:[
{"staff":{$exists: true}},
{$where:"this.staff[this.staff.length - 1].name == 'John'"} ]
22
Franck Michel
Condition on JSONPath expression - to - MongoDB QL
 10 rules matching different JSONPath patterns
Translation is no piece of cake!
• JSONPath: non-standard, somewhat unclear, ambiguities
• MongoDB find queries
No join, restrictions on union, hardly support nested queries, limited comparisons
 Several potential translation issues
• Unnecessary complexity: nested $or/$and
• Non-supported translation of some JSONPath expressions
• “*” stands for any array element as well as any document field
• unsupported array slice notation, …
• Misplaced operator:
• $where not in top-level query (inside an $elemMatch, $and)
23
Franck Michel
Come up with a concrete MongoDB query
Unsupported translation of some JSONPath expressions
• Keep track of them during the translation process
• N stands for “Non-supported clause”
• Remove not supported pieces
• C1 ∧ … ∧ Cn ∧ N → C1 ∧ … ∧ Cn
Widens the condition → all matching documents are returned, in addition to
possibly non-matching documents.
• C1 ∨… ∨ Cn ∨ N → N
The unsupported clause is raised to the parent clause iteratively, until it is
eventually removed, or it ends up in the top-level query: worst case = the query
retrieves all documents
• …
24
Franck Michel
Come up with a concrete MongoDB query
Misplaced operator: pull up $where operators to top-level
• C ∧ W → (C,W)
Top-level $and replaced with its members
• C ∨ W → UNION(C, W)
$or substituted with UNION (not a MongoDB operator).
UNION processed by the query processing engine
• C ∨ (D ∧ W) → UNION(C, D ∧ W))
• C ∧ (D ∨ W) → UNION( C ∧ D, C ∧ W)
• …
25
Franck Michel
Come up with a concrete MongoDB query
Theorem.
Let C be an equality or not-null condition on a JSONPath expression.
Let Q = (Q1, …Qn) be the abstract MongoDB query produced by trans(C).
Rewritability: It is always possible to rewrite Q into a query Q’ = UNION(Q’
1,…
Q’
m) such that ∀i ∈ [1, m] Q’
i is a valid MongoDB query, i.e. Q’
i does not contain
any unsupported clause, and a $where clause only shows at
the top-level of Q’
i.
Completeness: Q’ retrieves all the certain answers, i.e. all the documents
matching condition C. If Q contains at least one unsupported clause, then Q’
may retrieve additional documents that do not match condition C.
26
Franck Michel
Agenda
Previous episodes
Generalized mapping language: xR2RML
SPARQL-to-AQL Rewriting
AQL-to-MongoDB Rewriting
Conclusions & Perspectives
27
Franck Michel
Conclusions & perspectives
 Goal: foster the development of SPARQL interfaces to
heterogeneous databases, using domain ontologies
 Approach base on a pivot Abstract Query Language:
• Generalize existing works on SQL and XQuery
• Encompass all DB-independent steps of the rewriting process
 Apply the process in the case of MongoDB
• Not just an application: large gap between expressiveness of SPARQL
and MongoDB query languages
28
Franck Michel
Conclusions & perspectives
 SW vs. NoSQL: two un-reconciliable worlds?
Different paradigms:
• SW manages highly connected graphs,
• NoSQL’s manage isolated documents, joins hardly supported
NoSQL DBs
• pragmatically gave up on consistency and rich query features
• trade-off to high throughput/availability, horizontal elasticity
 Filling the gap between the two worlds is not straightforward
The experience of MongoDB shows challenges.
 Huge potential source of LOD, can’t be ignored anymore
29
Franck Michel
Conclusions & perspectives
 Working prototype Morph-xR2RML
• Use case in Digital Humanities [2]
• https://github.com/frmichel/morph-xr2rml/
 Perspectives
• Perform benchmarking
• Evaluate usability of MongoDB aggregate query [Botoeva et al. 2016],
characterize mappings wrt. find/aggregate query
[Botoeva et al. 2016] Botoeva Elena, Diego Calvanese, Benjamin Cogrel, Martin Rezk, and Guohui Xiao.
“OBDA beyond Relational DBs: A Study for MongoDB.” In 29th Int. Workshop on Description Logics (DL 2016)
30
Franck Michel
Contacts:
Franck Michel
Catherine Faron-Zucker
Johan Montagnat
[1] F. Michel, L. Djimenou, C. Faron-Zucker, and J. Montagnat. Translation of Relational and Non-Relational
Databases into RDF with xR2RML. In proc. of WebIST 2015.
[2] C. Callou, F. Michel, C. Faron-Zucker, C. Martin, J. Montagnat. Towards a Shared Reference Thesaurus for
Studies on History of Zoology, Archaeozoology and Conservation Biology. In SW4SH workshop, ESWC’15.
[3] F. Michel, C. Faron-Zucker, and J. Montagnat. A Generic Mapping-Based Query Translation from SPARQL to
Various Target Database Query Languages. In proc. of WebIST 2016.
https://github.com/frmichel/morph-xr2rml/

Más contenido relacionado

La actualidad más candente

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBNosh Petigara
 
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial IndexesBack to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial IndexesMongoDB
 
The Aggregation Framework
The Aggregation FrameworkThe Aggregation Framework
The Aggregation FrameworkMongoDB
 
Aggregation in MongoDB
Aggregation in MongoDBAggregation in MongoDB
Aggregation in MongoDBKishor Parkhe
 
Webinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation FrameworkWebinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation FrameworkMongoDB
 
Aggregation Framework
Aggregation FrameworkAggregation Framework
Aggregation FrameworkMongoDB
 
Agg framework selectgroup feb2015 v2
Agg framework selectgroup feb2015 v2Agg framework selectgroup feb2015 v2
Agg framework selectgroup feb2015 v2MongoDB
 
Introduction to MongoDB and Hadoop
Introduction to MongoDB and HadoopIntroduction to MongoDB and Hadoop
Introduction to MongoDB and HadoopSteven Francia
 
Barcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop PresentationBarcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop PresentationNorberto Leite
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Data Con LA
 
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDaysConexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDaysCAPSiDE
 
One BSON to Rule Them
One BSON to Rule ThemOne BSON to Rule Them
One BSON to Rule ThemDavid Golden
 
Back to Basics Webinar 5: Introduction to the Aggregation Framework
Back to Basics Webinar 5: Introduction to the Aggregation FrameworkBack to Basics Webinar 5: Introduction to the Aggregation Framework
Back to Basics Webinar 5: Introduction to the Aggregation FrameworkMongoDB
 
Inside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseInside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseMike Dirolf
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用LearningTech
 

La actualidad más candente (20)

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial IndexesBack to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
 
The Aggregation Framework
The Aggregation FrameworkThe Aggregation Framework
The Aggregation Framework
 
Aggregation in MongoDB
Aggregation in MongoDBAggregation in MongoDB
Aggregation in MongoDB
 
Webinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation FrameworkWebinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation Framework
 
Aggregation Framework
Aggregation FrameworkAggregation Framework
Aggregation Framework
 
Apache solr
Apache solrApache solr
Apache solr
 
Agg framework selectgroup feb2015 v2
Agg framework selectgroup feb2015 v2Agg framework selectgroup feb2015 v2
Agg framework selectgroup feb2015 v2
 
Introduction to MongoDB and Hadoop
Introduction to MongoDB and HadoopIntroduction to MongoDB and Hadoop
Introduction to MongoDB and Hadoop
 
Barcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop PresentationBarcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop Presentation
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
 
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDaysConexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
 
Indexing
IndexingIndexing
Indexing
 
One BSON to Rule Them
One BSON to Rule ThemOne BSON to Rule Them
One BSON to Rule Them
 
Back to Basics Webinar 5: Introduction to the Aggregation Framework
Back to Basics Webinar 5: Introduction to the Aggregation FrameworkBack to Basics Webinar 5: Introduction to the Aggregation Framework
Back to Basics Webinar 5: Introduction to the Aggregation Framework
 
MongoDB crud
MongoDB crudMongoDB crud
MongoDB crud
 
4 sw architectures and sparql
4 sw architectures and sparql4 sw architectures and sparql
4 sw architectures and sparql
 
Inside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseInside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source Database
 
Mongo db queries
Mongo db queriesMongo db queries
Mongo db queries
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
 

Similar a A Mapping-based Method to Query MongoDB Documents with SPARQL

A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...Franck Michel
 
Introduction to MongoDB and Workshop
Introduction to MongoDB and WorkshopIntroduction to MongoDB and Workshop
Introduction to MongoDB and WorkshopAhmedabadJavaMeetup
 
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...MongoDB
 
Indexing and Query Optimizer
Indexing and Query OptimizerIndexing and Query Optimizer
Indexing and Query OptimizerMongoDB
 
Slides
SlidesSlides
Slidesbutest
 
MongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB Europe 2016 - Graph Operations with MongoDBMongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB Europe 2016 - Graph Operations with MongoDBMongoDB
 
Machine-Interpretable Dataset and Service Descriptions for Heterogeneous Data...
Machine-Interpretable Dataset and Service Descriptions for Heterogeneous Data...Machine-Interpretable Dataset and Service Descriptions for Heterogeneous Data...
Machine-Interpretable Dataset and Service Descriptions for Heterogeneous Data...andimou
 
Moving Library Metadata Toward Linked Data: Opportunities Provided by the eX...
Moving Library Metadata Toward Linked Data:  Opportunities Provided by the eX...Moving Library Metadata Toward Linked Data:  Opportunities Provided by the eX...
Moving Library Metadata Toward Linked Data: Opportunities Provided by the eX...Jennifer Bowen
 
Data integration with a façade. The case of knowledge graph construction.
Data integration with a façade. The case of knowledge graph construction.Data integration with a façade. The case of knowledge graph construction.
Data integration with a façade. The case of knowledge graph construction.Enrico Daga
 
Map, flatmap and reduce are your new best friends (javaone, svcc)
Map, flatmap and reduce are your new best friends (javaone, svcc)Map, flatmap and reduce are your new best friends (javaone, svcc)
Map, flatmap and reduce are your new best friends (javaone, svcc)Chris Richardson
 
Webinar: Working with Graph Data in MongoDB
Webinar: Working with Graph Data in MongoDBWebinar: Working with Graph Data in MongoDB
Webinar: Working with Graph Data in MongoDBMongoDB
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBLisa Roth, PMP
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB
 
Data Science with Solr and Spark
Data Science with Solr and SparkData Science with Solr and Spark
Data Science with Solr and SparkLucidworks
 
Text Mining Applied to SQL Queries: a Case Study for SDSS SkyServer
Text Mining Applied to SQL Queries: a Case Study for SDSS SkyServerText Mining Applied to SQL Queries: a Case Study for SDSS SkyServer
Text Mining Applied to SQL Queries: a Case Study for SDSS SkyServerVitor Hirota Makiyama
 
The Other HPC: High Productivity Computing in Polystore Environments
The Other HPC: High Productivity Computing in Polystore EnvironmentsThe Other HPC: High Productivity Computing in Polystore Environments
The Other HPC: High Productivity Computing in Polystore EnvironmentsUniversity of Washington
 

Similar a A Mapping-based Method to Query MongoDB Documents with SPARQL (20)

A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
 
Linked Data Fragments
Linked Data FragmentsLinked Data Fragments
Linked Data Fragments
 
Introduction to MongoDB and Workshop
Introduction to MongoDB and WorkshopIntroduction to MongoDB and Workshop
Introduction to MongoDB and Workshop
 
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
 
Indexing and Query Optimizer
Indexing and Query OptimizerIndexing and Query Optimizer
Indexing and Query Optimizer
 
Slides
SlidesSlides
Slides
 
MongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB Europe 2016 - Graph Operations with MongoDBMongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB Europe 2016 - Graph Operations with MongoDB
 
Machine-Interpretable Dataset and Service Descriptions for Heterogeneous Data...
Machine-Interpretable Dataset and Service Descriptions for Heterogeneous Data...Machine-Interpretable Dataset and Service Descriptions for Heterogeneous Data...
Machine-Interpretable Dataset and Service Descriptions for Heterogeneous Data...
 
Einführung in MongoDB
Einführung in MongoDBEinführung in MongoDB
Einführung in MongoDB
 
Sparql
SparqlSparql
Sparql
 
Moving Library Metadata Toward Linked Data: Opportunities Provided by the eX...
Moving Library Metadata Toward Linked Data:  Opportunities Provided by the eX...Moving Library Metadata Toward Linked Data:  Opportunities Provided by the eX...
Moving Library Metadata Toward Linked Data: Opportunities Provided by the eX...
 
Data integration with a façade. The case of knowledge graph construction.
Data integration with a façade. The case of knowledge graph construction.Data integration with a façade. The case of knowledge graph construction.
Data integration with a façade. The case of knowledge graph construction.
 
Map, flatmap and reduce are your new best friends (javaone, svcc)
Map, flatmap and reduce are your new best friends (javaone, svcc)Map, flatmap and reduce are your new best friends (javaone, svcc)
Map, flatmap and reduce are your new best friends (javaone, svcc)
 
Webinar: Working with Graph Data in MongoDB
Webinar: Working with Graph Data in MongoDBWebinar: Working with Graph Data in MongoDB
Webinar: Working with Graph Data in MongoDB
 
Dagstuhl 2013 - Montali - On the Relationship between OBDA and Relational Map...
Dagstuhl 2013 - Montali - On the Relationship between OBDA and Relational Map...Dagstuhl 2013 - Montali - On the Relationship between OBDA and Relational Map...
Dagstuhl 2013 - Montali - On the Relationship between OBDA and Relational Map...
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
 
Data Science with Solr and Spark
Data Science with Solr and SparkData Science with Solr and Spark
Data Science with Solr and Spark
 
Text Mining Applied to SQL Queries: a Case Study for SDSS SkyServer
Text Mining Applied to SQL Queries: a Case Study for SDSS SkyServerText Mining Applied to SQL Queries: a Case Study for SDSS SkyServer
Text Mining Applied to SQL Queries: a Case Study for SDSS SkyServer
 
The Other HPC: High Productivity Computing in Polystore Environments
The Other HPC: High Productivity Computing in Polystore EnvironmentsThe Other HPC: High Productivity Computing in Polystore Environments
The Other HPC: High Productivity Computing in Polystore Environments
 

Más de Franck Michel

ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...
ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...
ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...Franck Michel
 
Bioschemas: Marking up biodiversity websites to improve data discovery and we...
Bioschemas: Marking up biodiversity websites to improve data discovery and we...Bioschemas: Marking up biodiversity websites to improve data discovery and we...
Bioschemas: Marking up biodiversity websites to improve data discovery and we...Franck Michel
 
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...Unleash the Potential of your Website! 180,000 webpages from the French NHM m...
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...Franck Michel
 
Heterogeneous Data Aggregation and Querying at Web Scale Using Semantic align...
Heterogeneous Data Aggregation and Querying at Web Scale Using Semantic align...Heterogeneous Data Aggregation and Querying at Web Scale Using Semantic align...
Heterogeneous Data Aggregation and Querying at Web Scale Using Semantic align...Franck Michel
 
Describe and Publish data sets on the web: vocabularies, catalogues, data por...
Describe and Publish data sets on the web: vocabularies, catalogues, data por...Describe and Publish data sets on the web: vocabularies, catalogues, data por...
Describe and Publish data sets on the web: vocabularies, catalogues, data por...Franck Michel
 
Knowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked dataKnowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked dataFranck Michel
 
Enabling Automatic Discovery and Querying of Web APIs at Web Scale using Link...
Enabling Automatic Discovery and Querying of Web APIs at Web Scale using Link...Enabling Automatic Discovery and Querying of Web APIs at Web Scale using Link...
Enabling Automatic Discovery and Querying of Web APIs at Web Scale using Link...Franck Michel
 
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future Opportunities
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future OpportunitiesModelling Biodiversity Linked Data: Pragmatism May Narrow Future Opportunities
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future OpportunitiesFranck Michel
 
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...Franck Michel
 
SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked Data
SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked DataSPARQL Micro-Services: Lightweight Integration of Web APIs and Linked Data
SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked DataFranck Michel
 
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...Construction d’un référentiel taxonomique commun pour des études sur l’histoi...
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...Franck Michel
 
Make our Scientific Datasets Accessible and Interoperable on the Web
Make our Scientific Datasets Accessible and Interoperable on the WebMake our Scientific Datasets Accessible and Interoperable on the Web
Make our Scientific Datasets Accessible and Interoperable on the WebFranck Michel
 
Translation of Relational and Non-Relational Databases into RDF with xR2RML
Translation of Relational and Non-Relational Databases into RDF with xR2RMLTranslation of Relational and Non-Relational Databases into RDF with xR2RML
Translation of Relational and Non-Relational Databases into RDF with xR2RMLFranck Michel
 
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...Franck Michel
 

Más de Franck Michel (14)

ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...
ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...
ISSA: Generic Pipeline, Knowledge Model and Visualization tools to Help Scien...
 
Bioschemas: Marking up biodiversity websites to improve data discovery and we...
Bioschemas: Marking up biodiversity websites to improve data discovery and we...Bioschemas: Marking up biodiversity websites to improve data discovery and we...
Bioschemas: Marking up biodiversity websites to improve data discovery and we...
 
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...Unleash the Potential of your Website! 180,000 webpages from the French NHM m...
Unleash the Potential of your Website! 180,000 webpages from the French NHM m...
 
Heterogeneous Data Aggregation and Querying at Web Scale Using Semantic align...
Heterogeneous Data Aggregation and Querying at Web Scale Using Semantic align...Heterogeneous Data Aggregation and Querying at Web Scale Using Semantic align...
Heterogeneous Data Aggregation and Querying at Web Scale Using Semantic align...
 
Describe and Publish data sets on the web: vocabularies, catalogues, data por...
Describe and Publish data sets on the web: vocabularies, catalogues, data por...Describe and Publish data sets on the web: vocabularies, catalogues, data por...
Describe and Publish data sets on the web: vocabularies, catalogues, data por...
 
Knowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked dataKnowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked data
 
Enabling Automatic Discovery and Querying of Web APIs at Web Scale using Link...
Enabling Automatic Discovery and Querying of Web APIs at Web Scale using Link...Enabling Automatic Discovery and Querying of Web APIs at Web Scale using Link...
Enabling Automatic Discovery and Querying of Web APIs at Web Scale using Link...
 
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future Opportunities
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future OpportunitiesModelling Biodiversity Linked Data: Pragmatism May Narrow Future Opportunities
Modelling Biodiversity Linked Data: Pragmatism May Narrow Future Opportunities
 
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...
A Model to Represent Nomenclatural and Taxonomic Information as Linked Data. ...
 
SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked Data
SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked DataSPARQL Micro-Services: Lightweight Integration of Web APIs and Linked Data
SPARQL Micro-Services: Lightweight Integration of Web APIs and Linked Data
 
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...Construction d’un référentiel taxonomique commun pour des études sur l’histoi...
Construction d’un référentiel taxonomique commun pour des études sur l’histoi...
 
Make our Scientific Datasets Accessible and Interoperable on the Web
Make our Scientific Datasets Accessible and Interoperable on the WebMake our Scientific Datasets Accessible and Interoperable on the Web
Make our Scientific Datasets Accessible and Interoperable on the Web
 
Translation of Relational and Non-Relational Databases into RDF with xR2RML
Translation of Relational and Non-Relational Databases into RDF with xR2RMLTranslation of Relational and Non-Relational Databases into RDF with xR2RML
Translation of Relational and Non-Relational Databases into RDF with xR2RML
 
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...
Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archa...
 

Último

Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptxSilpa
 
300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptxryanrooker
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxSilpa
 
Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.Silpa
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learninglevieagacer
 
Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.Silpa
 
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxTHE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxANSARKHAN96
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bSérgio Sacani
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryAlex Henderson
 
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIACURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIADr. TATHAGAT KHOBRAGADE
 
Chemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdfChemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdfSumit Kumar yadav
 
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry Areesha Ahmad
 
Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.Silpa
 
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...Monika Rani
 
Genetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditionsGenetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditionsbassianu17
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceAlex Henderson
 
Genome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxGenome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxSilpa
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusNazaninKarimi6
 
Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsOrtegaSyrineMay
 

Último (20)

Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptx
 
Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 
Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.
 
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxTHE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIACURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
 
Chemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdfChemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdf
 
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
 
Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.
 
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
 
Genetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditionsGenetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditions
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical Science
 
Genome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxGenome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptx
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its Functions
 

A Mapping-based Method to Query MongoDB Documents with SPARQL

  • 1. 1 Franck Michel A Mapping-based Method to Query MongoDB Documents with SPARQL F. Michel, C. Faron-Zucker, J. Montagnat Université Côte d’Azur, CNRS, Inria, I3S, France
  • 2. 2 Franck Michel Towards a Web of Data From a Web of Documents ...to a Web of (Linked) Data Interlinking of open datasets in a common machine-readable format, using common vocabularies
  • 3. 3 Franck Michel Web-scale data integration Exponential data growth Heterogeneous data sources Knowledge formalized as Domain Ontologies, Thesauri, Taxonomies… A Web of Linked Open Data NoSQL: huge potential source of Linked Open Data, yet largely ignored/despised so far ID NAME
  • 4. 4 Franck Michel Populate the Web of Data with Legacy Data
  • 5. 5 Franck Michel Common Approaches Legacy DB Graph Materialization (ETL like) Virtual Graph Data freshness Big datasets DB-to-RDF Mappings Query rewriting
  • 6. 6 Franck Michel SPARQL Access to Heterogeneous DBs Previous SPARQL rewritings closely coupled with the target QL expressiveness (SQL, XQuery): • Support of joins, unions, nested queries, filtering, string fctn, etc. • Semantics-preserving 1-to-1 rewriting How not to define yet another rewriting method for each DB? Two-step approach to deal with the general case [3]: 1. Translate SPARQL into a pivot Abstract Query Language (AQL) under DB-to-RDF mappings, with no assumption on the target DB capabilities 2. Translate from the AQL to the QL of the target database
  • 7. 7 Franck Michel Agenda Previous episodes Generalized mapping language: xR2RML SPARQL-to-AQL Rewriting AQL-to-MongoDB Rewriting Conclusions & Perspectives
  • 8. 8 Franck Michel Agenda Previous episodes Generalized mapping language: xR2RML SPARQL-to-AQL Rewriting AQL-to-MongoDB Rewriting Conclusions & Perspectives
  • 9. 9 Franck Michel The xR2RML mapping language [1]  Extends W3C R2RML and RML  Describe mappings from various types of DB to RDF • Query the target database • Pick data elements from query results • Translate them to (subject, predicate, object) using arbitrary ontologies  Independent of any target database • Allow any query language • Allow any syntax to reference data elements within query results (column name, JSONPath, XPath, attribute name...)
  • 10. 10 Franck Michel The xR2RML mapping language: example <http://example.org/member/106> foaf:mbox "john@foo.com". <http://example.org/member/106> foaf:mbox "john@example.org". <#Mbox> a rr:TriplesMap; xrr:logicalSource [ xrr:query "db.people.find({'emails':{$ne: null}})" ]; rr:subjectMap [ rr:template "http://example.org/member/{$.id}" ]; rr:predicateObjectMap [ rr:predicate foaf:mbox; rr:objectMap [ xrr:reference "$.emails.*" ]. xR2RML { "id": 106, "firstname": "John", "emails": ["john@foo.com", "john@example.org"] }
  • 11. 11 Franck Michel Graph Pattern SPARQL-to-AQL rewriting [3] Basic Graph Pattern SELECT ?mbox WHERE { ?x foaf:mbox "john@foo.com". ?x foaf:mbox ?mbox. FILTER { ?mbox != "john@foo.com"} } Triple Pattern Rewrite a well-designed SPARQL graph pattern into an optimized Abstract Query, under a set of xR2RML mappings. In turn, it should be possible to translate the Abstract Query into “any” target database QL.
  • 12. 12 Franck Michel SPARQL-to-AQL rewriting in one slide! SELECT ?mbox WHERE { ?x foaf:mbox "john@foo.com". ?x foaf:mbox ?mbox. FILTER { ?mbox != "john@foo.com" } } { From: { "db.people.find({'emails':{$ne:null}})" }, Project: { $.id AS ?x }, Where: { isNotNull($.id), equals($.emails.*, "john@foo.com")}} INNER JOIN { From: { "db.people.find({'emails':{$ne: null}})" }, Project: { $.id AS ?x , $.emails.* AS ?mbox }, Where: { isNotNull($.id), isNotNull($.emails.*), sparqlFilter(?mbox != "john@foo.com")}} ON { ?x } Abstract Query <#Mbox> a rr:TriplesMap; xrr:logicalSource [ xrr:query "db.people.find({'emails':{$ne: null}})" ]; rr:subjectMap [ rr:template "http://example.org/member/{$.id}" ]; rr:predicateObjectMap [ rr:predicate foaf:mbox; rr:objectMap [ xrr:reference "$.emails.*" ]. xR2RML mapping Self-join
  • 13. 13 Franck Michel Agenda Previous episodes Generalized mapping language: xR2RML SPARQL-to-AQL Rewriting AQL-to-MongoDB Rewriting Conclusions & Perspectives
  • 14. 14 Franck Michel Why MongoDB? Sources: db-engines.com Popularity measure: Number of results in search engines, Google Trends, frequency of technical discussions, job offers, profiles in professional networks, number of tweets
  • 15. 15 Franck Michel Why MongoDB?  MongoDB: very popular NoSQL database today  (Probably) increasingly adopted as a general-purpose DB • Long tail of scientific data?  Non-tabular format • E.g. with Cassandra, a regular SQL-to-RDF would “almost” do the job A good candidate to experiment what it takes to publish NoSQL data into the Web of Linked Open Data
  • 16. 16 Franck Michel MongoDB Query Language  Find queries Declarative retrieval of doc. matching criteria db.people.find({"age":{$gt: 30}}, {"code":1}) Limitations: no join, restrictions on union and nested queries, limited comparisons  Aggregate queries • Definition of processing pipelines: • project, match, lookup, unwind, … • Richer than find queries • But more difficult to anticipate performance  We consider find queries in a first approach
  • 17. 17 Franck Michel SPARQL to MongoDB query rewriting Rewrite SPARQL Query Abstract Query xR2RML mapping AQL Operators: INNER JOIN ON LEFT JOIN ON UNION FILTER LIMIT Atomic AQ: From: concrete MongoDB query Where: conditions on JSONPath expressions isNotNull, equals, sparqlFilter, OR, AND
  • 18. 18 Franck Michel AQL Operators: INNER JOIN ON LEFT JOIN ON UNION FILTER LIMIT Atomic AQ: From: concrete MongoDB query Where: conditions on JSONPath expressions isNotNull, equals, sparqlFilter, OR, AND SPARQL to MongoDB query rewriting Rewrite SPARQL Query Abstract Query xR2RML mapping AQL Operators: INNER JOIN ON LEFT JOIN ON UNION: $or as root of a query document FILTER: restrictions (no field comp.), perf. ($where) LIMIT Atomic AQ: From: concrete MongoDB query Where: conditions on JSONPath expressions isNotNull, equals, sparqlFilter, OR, AND
  • 19. 19 Franck Michel SPARQL to MongoDB query rewriting Rewrite SPARQL Query Abstract Query xR2RML mapping AQL Operators: INNER JOIN ON LEFT JOIN ON UNION: $or as root of a query document FILTER: restrictions (no field comp.), perf. ($where) LIMIT Atomic AQ: From: concrete MongoDB query Where: conditions on JSONPath expressions isNotNull, equals, sparqlFilter, OR, AND Query Processing Engine Query Processing Engine processing burden
  • 20. 20 Franck Michel SPARQL to MongoDB query rewriting Rewrite SPARQL Query Abstract Query xR2RML mapping Translate each atomic AQ Optimize/Rewrite AQL Operators: INNER JOIN ON LEFT JOIN ON UNION FILTER LIMIT Conditions on JSONPath expressions translated into MongoDB operators Atomic AQ: From: concrete MongoDB query Where: conditions on JSONPath expressions Concrete MongoDB Query Abstract MongoDB Query Query Processing Engine
  • 21. 21 Franck Michel Condition on JSONPath expression - to - MongoDB QL  Example query isNotNull($.id) → "id": {$exists:true, $ne:null} equals($.emails.*, "john@foo.com") → "emails": {$elemMatch: {$eq:"john@foo.com"}}  Field alternative equals($.p.["q", "r"], 10) → $or: [ {"p.q":{$eq: 10}}, {"p.r":{$eq: 10}} ]  JavaScript calculated array index equals($.staff[(@.length - 1)].name, "John") → $and:[ {"staff":{$exists: true}}, {$where:"this.staff[this.staff.length - 1].name == 'John'"} ]
  • 22. 22 Franck Michel Condition on JSONPath expression - to - MongoDB QL  10 rules matching different JSONPath patterns Translation is no piece of cake! • JSONPath: non-standard, somewhat unclear, ambiguities • MongoDB find queries No join, restrictions on union, hardly support nested queries, limited comparisons  Several potential translation issues • Unnecessary complexity: nested $or/$and • Non-supported translation of some JSONPath expressions • “*” stands for any array element as well as any document field • unsupported array slice notation, … • Misplaced operator: • $where not in top-level query (inside an $elemMatch, $and)
  • 23. 23 Franck Michel Come up with a concrete MongoDB query Unsupported translation of some JSONPath expressions • Keep track of them during the translation process • N stands for “Non-supported clause” • Remove not supported pieces • C1 ∧ … ∧ Cn ∧ N → C1 ∧ … ∧ Cn Widens the condition → all matching documents are returned, in addition to possibly non-matching documents. • C1 ∨… ∨ Cn ∨ N → N The unsupported clause is raised to the parent clause iteratively, until it is eventually removed, or it ends up in the top-level query: worst case = the query retrieves all documents • …
  • 24. 24 Franck Michel Come up with a concrete MongoDB query Misplaced operator: pull up $where operators to top-level • C ∧ W → (C,W) Top-level $and replaced with its members • C ∨ W → UNION(C, W) $or substituted with UNION (not a MongoDB operator). UNION processed by the query processing engine • C ∨ (D ∧ W) → UNION(C, D ∧ W)) • C ∧ (D ∨ W) → UNION( C ∧ D, C ∧ W) • …
  • 25. 25 Franck Michel Come up with a concrete MongoDB query Theorem. Let C be an equality or not-null condition on a JSONPath expression. Let Q = (Q1, …Qn) be the abstract MongoDB query produced by trans(C). Rewritability: It is always possible to rewrite Q into a query Q’ = UNION(Q’ 1,… Q’ m) such that ∀i ∈ [1, m] Q’ i is a valid MongoDB query, i.e. Q’ i does not contain any unsupported clause, and a $where clause only shows at the top-level of Q’ i. Completeness: Q’ retrieves all the certain answers, i.e. all the documents matching condition C. If Q contains at least one unsupported clause, then Q’ may retrieve additional documents that do not match condition C.
  • 26. 26 Franck Michel Agenda Previous episodes Generalized mapping language: xR2RML SPARQL-to-AQL Rewriting AQL-to-MongoDB Rewriting Conclusions & Perspectives
  • 27. 27 Franck Michel Conclusions & perspectives  Goal: foster the development of SPARQL interfaces to heterogeneous databases, using domain ontologies  Approach base on a pivot Abstract Query Language: • Generalize existing works on SQL and XQuery • Encompass all DB-independent steps of the rewriting process  Apply the process in the case of MongoDB • Not just an application: large gap between expressiveness of SPARQL and MongoDB query languages
  • 28. 28 Franck Michel Conclusions & perspectives  SW vs. NoSQL: two un-reconciliable worlds? Different paradigms: • SW manages highly connected graphs, • NoSQL’s manage isolated documents, joins hardly supported NoSQL DBs • pragmatically gave up on consistency and rich query features • trade-off to high throughput/availability, horizontal elasticity  Filling the gap between the two worlds is not straightforward The experience of MongoDB shows challenges.  Huge potential source of LOD, can’t be ignored anymore
  • 29. 29 Franck Michel Conclusions & perspectives  Working prototype Morph-xR2RML • Use case in Digital Humanities [2] • https://github.com/frmichel/morph-xr2rml/  Perspectives • Perform benchmarking • Evaluate usability of MongoDB aggregate query [Botoeva et al. 2016], characterize mappings wrt. find/aggregate query [Botoeva et al. 2016] Botoeva Elena, Diego Calvanese, Benjamin Cogrel, Martin Rezk, and Guohui Xiao. “OBDA beyond Relational DBs: A Study for MongoDB.” In 29th Int. Workshop on Description Logics (DL 2016)
  • 30. 30 Franck Michel Contacts: Franck Michel Catherine Faron-Zucker Johan Montagnat [1] F. Michel, L. Djimenou, C. Faron-Zucker, and J. Montagnat. Translation of Relational and Non-Relational Databases into RDF with xR2RML. In proc. of WebIST 2015. [2] C. Callou, F. Michel, C. Faron-Zucker, C. Martin, J. Montagnat. Towards a Shared Reference Thesaurus for Studies on History of Zoology, Archaeozoology and Conservation Biology. In SW4SH workshop, ESWC’15. [3] F. Michel, C. Faron-Zucker, and J. Montagnat. A Generic Mapping-Based Query Translation from SPARQL to Various Target Database Query Languages. In proc. of WebIST 2016. https://github.com/frmichel/morph-xr2rml/