<figure><img src="image_1.png" /></figure>

HAL
open science

# Integrating Heterogeneous Data Sources in the Web of Data

Franck Michel

► To cite this version:

Franck Michel. Integrating Heterogeneous Data Sources in the Web of Data. École thématique. Journées du développement logiciel (JDEV 2017), Marseille, France. 2017. cel-01585312

HAL Id: cel-01585312

https://hal.science/cel-01585312

Submitted on 11 Sep 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_3.png" /></figure>

<figure><img src="image_4.png" /></figure>

<figure><img src="image_5.png" /></figure>

# Integrating Heterogeneous Data Sources in the Web of Data

JDEV 2017

Franck Michel

UNIVERSITÉ
CÔTE D'AZUR

<figure><img src="image_6.png" /></figure>

<figure><img src="image_7.png" /></figure>

<figure><img src="image_8.png" /></figure>
More data sources ➔ More opportunities

<figure><img src="image_9.png" /></figure>

<figure><img src="image_10.png" /></figure>

<figure><img src="image_11.png" /></figure>

WIKIPEDIA
The Free Encyclopedia

<figure><img src="image_12.png" /></figure>
Example: study history of zoological knowledge

<figure><img src="image_13.png" /></figure>

First Natural History Encyclopedia, 1485.

<figure><img src="image_14.png" /></figure>

<figure><img src="image_15.png" /></figure>

<figure><img src="image_16.png" /></figure>

Conservation biology*

<figure><img src="image_17.png" /></figure>

<figure><img src="image_18.png" /></figure>

Archaeological excavation
Knowledge formalizations

Controlled vocabularies,
taxonomies
domain ontologies, ...

<figure><img src="image_19.png" /></figure>

Conservation biology*

<figure><img src="image_20.png" /></figure>

Archaeological excavation

<figure><img src="image_21.png" /></figure>

<footnote>* http://www.lynxeds.com/hmw/plate/family-delphinidae-ocean-dolphins</footnote>
<figure><img src="image_22.png" /><figcaption>LOD Cloud: 10K datasets, 150B Statements</figcaption></figure>

✓ On the Web

✓ In RDF

✓ Under open
licences

✓ Interlinked
# Publishing legacy data in RDF raises tricky questions

<figure><img src="image_23.png" /></figure>
# Agenda

<figure><img src="image_24.png" /></figure>

- Describe the translation of heterogeneous data into RDF

- Choose vocabularies to represent RDF data

- Access the RDF data produced

- The key importance of metadata

<figure><img src="image_25.png" /></figure>
<figure><img src="image_26.png" /></figure>

Describe the translation of heterogeneous data into RDF

Choose vocabularies to represent RDF data

Access the RDF data produced

The key importance of metadata

<figure><img src="image_27.png" /></figure>
# Data Sources Have Heterogeneous Data Models

## Documents

<figure><img src="image_28.png" /></figure>

## Relational DB

<table><thead><tr><td>ID</td><td>NAME</td><td></td></tr></thead><tbody><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## Native XML DBs

```xml
<Books>
  <Book ISBN="0553212419">
    <title>Sherlock Holmes: Complete Novels...</title>
    <author>Sir Arthur Conan Doyle</author>
  </Book>
  <Book ISBN="0743273567">
    <title>The Great Gatsby</title>
    <author>F. Scott Fitzgerald</author>
  </Book>
  <Book ISBN="0684826976">
    <title>Undaunted Courage</title>
    <author>Stephen E. Ambrose</author>
  </Book>
  <Book ISBN="0743203178">
    <title>Nothing Like It In the World</title>
    <author>Stephen E. Ambrose</author>
  </Book>
</Books>
```

## Object-Oriented

<figure><img src="image_29.png" /></figure>

## Graph

<figure><img src="image_30.png" /></figure>

<figure><img src="image_31.png" /></figure>

<figure><img src="image_32.png" /></figure>
<figure><img src="image_33.png" /></figure>

Describe the translation of heterogeneous data into RDF

HTML data with RDFa

CSV data

Relational data

NoSQL data

Choose vocabularies to represent RDF data

Access the RDF data produced

The key importance of metadata

<figure><img src="image_34.png" /></figure>
<figure><img src="image_35.png" /></figure>

Describe the translation of heterogeneous data into RDF

* HTML data with RDFa

* CSV data

* Relational data

* NoSQL data

Choose vocabularies to represent RDF data

Access the RDF data produced

The key importance of metadata

<figure><img src="image_36.png" /></figure>
<figure><img src="image_37.png" /></figure>

http://devlog.cnrs.fr/

<figure><img src="image_38.png" /></figure>

```html
<body vocab="http://schema.org/">
<div resource="/jdev2017" typeof="Event">
<h2 property="title">JDEV 2017</h2>
<p>Date: <span property=" startDate ">2017-07-04</span></p>
...
<p>T2 - Ingénierie et web des données.
<a property="url" href="http://devlog.cnrs.fr/jdev2017/t2">More...</a>
</p>
</div>
</body>
```

<figure><img src="image_39.png" /></figure>

prefix sch: <http://schema.org/>
<http://devlog.cnrs.fr/jdev2017>
rdf:type sch:Event ;
sch:title "JDEV 2017";
sch: startDate "2015-10-20" ;
sch: url <http://devlog.cnrs.fr/jdev2017/t2> .
<figure><img src="image_40.png" /></figure>

Describe the translation of heterogeneous data into RDF

HTML data with RDFa

CSV data

Relational data

NoSQL data

Choose vocabularies to represent RDF data

Access the RDF data produced

The key importance of metadata

<figure><img src="image_41.png" /></figure>
# CSVW: CSV on the Web

ID, Street, Species, Trim Cycle, Inventory Date
1, Addison Av, Celtis australis, 2010/10/18
2, Emerson St, Liquidambar styraciflua, 2010/06/02

<figure><img src="image_42.png" /></figure>

GET trees.csv

<figure><img src="image_43.png" /></figure>

<figure><img src="image_44.png" /></figure>

Content-Type: text/csv

Link: http://example.org/trees.json; rel="..."

ID, Street, Species, Trim Cycle, Inventory Date
1, Addison Av, Celtis australis, 2010/10/18

```json
{ "@context": [ "http://www.w3.org/ns/csvw", { "@language": "en" } ],
```

"url": "trees.csv", "dc:title": "Trees"

"dc:license": { "@id": "http://.../../cc-by/" },

"dc:modified": { "@value": "2010-12-31", "@type": "xsd date" },

"tableSchema": {

"columns": [

{ "name": "ID", "titles": ["ID", "Identifier"], "datatype": "string", "required": true },

{ "name": "Street", "titles": "On Street", "dc>Description": "...", "datatype": "string" }, ...

"primaryKey": "ID", "aboutUrl": "#id-{ID}" } ]

lua, 2010/06/02
<figure><img src="image_45.png" /></figure>

Describe the translation of heterogeneous data into RDF

HTML data with RDFa

CSV data

Relational data

NoSQL data

Choose vocabularies to represent RDF data

Access the RDF data produced

The key importance of metadata

<figure><img src="image_46.png" /></figure>
# Direct Mapping of a RDB to RDF

<table><thead><tr><th colspan="3">Table: PEOPLE</th></tr><tr><th>ID</th><th>FNAME</th><th>WROTE (FK BOOK/ID)</th></tr></thead><tbody><tr><td>7</td><td>Catherine</td><td>22</td></tr><tr><td>8</td><td>Olivier</td><td>22</td></tr><tr><td>...</td><td>...</td><td>...</td></tr></tbody></table>

<PEOPLE>ID=7> rdf:type <PEOPLE>.
<PEOPLE>ID=7> <PEOPLE#FNAME> "Catherine".
<PEOPLE>ID=7> <PEOPLE#WROTE> <BOOK/ID=22>.

<PEOPLE>ID=8> rdf:type <People>.
<PEOPLE>ID=8> <PEOPLE#FNAME> "Olivier".
<PEOPLE>ID=8> <PEOPLE#WROTE> <BOOK/ID=22>.
## Custom Mapping of a RDB to RDF

<table><thead><tr><th colspan="3">Table: PEOPLE</th></tr><tr><th>ID</th><th>FNAME</th><th>WROTE (FK BOOK/ID)</th></tr></thead><tbody><tr><td>7</td><td>Catherine</td><td>22</td></tr><tr><td>8</td><td>Olivier</td><td>22</td></tr><tr><td>...</td><td>...</td><td>...</td></tr></tbody></table>

<http://unice.fr/staff/7> rdf:type ex:Teacher.

<http://unice.fr/staff/7> foaf:name "Catherine".

<http://unice.fr/staff/7> dc:contributor <http://unice.fr/book/22>.

<http://unice.fr/staff/8> rdf:type ex:Teacher.

<http://unice.fr/staff/8> foaf:name "Olivier".

<http://unice.fr/staff/8> dc:contributor <http://unice.fr/book/22>.

Existing vocabularies
# Custom Mapping of a RDB to RDF with R2RML

http://www.w3.org/TR/r2rml/

```xml
<#MapPeople>
  rr:logicalTable [ rr:tableName "PEOPLE" ];
  rr:subjectMap [
    rr:template "http://unice.fr/staff/{ID}";
    rr:class ex:Teacher;
  ];
  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rr:column "FNAME" ];
  ].
</#MapPeople>
```

<figure><img src="image_47.png" /></figure>

<figure><img src="image_48.png" /></figure>

```xml
<http://unice.fr/staff/7> rdf:type ex:Teacher.
<http://unice.fr/staff/7> foaf:name "Catherine".
<http://unice.fr/staff/8> rdf:type ex:Teacher.
<http://unice.fr/staff/8> foaf:name "Olivier".
```
<figure><img src="image_49.png" /></figure>

Describe the translation of heterogeneous data into RDF

HTML data with RDFa

CSV data

Relational data

NoSQL data

Choose vocabularies to represent RDF data

Access the RDF data produced

The key importance of metadata

<figure><img src="image_50.png" /></figure>
# Mapping of a NoSQL DBs to RDF with xR2RML

```json
{ "id": 106,
  "firstname": "John",
  "emails": [ "john@foo.com", "john@example.org" ]
}
```

<figure><img src="image_51.png" /></figure>

mongoDB

<figure><img src="image_52.png" /></figure>

<figure><img src="image_53.png" /></figure>
# Many methods for many types of data sources

## HTML

RDFa, Microformats

## XML

AstroGrid-D, SPARQL2XQuery, XSPARQL

## CSV/TSV/Spreadsheets

XLWrap, Linked CSV, CSVW, RML

## JSON

TARQL, JSON-LD, RML

## Relational Databases

D2RQ, R<sub>2</sub>O, Ultrawrap, Triplify, SM
R2RML: Morph-RDB, ontop, Virtuoso

## NoSQL

xR2RML (MongoDB), ontop (MongoDB),
[Mugnier et al, 2016]

## Multiple formats

RML, TARQL, Apache Any23, DataLift,
SPARQL-Generate

<figure><img src="image_54.png" /></figure>
<figure><img src="image_55.png" /></figure>

* Describe the translation of heterogeneous data into RDF

* Choose vocabularies to represent RDF data

* Access the RDF data produced

* The key importance of metadata
Direct mapping: create my own vocabulary

Can be derived from an existing schema

May seem easier: “I do whatever I want”

But no added semantics, need to link my vocabulary with
other ones

<figure><img src="image_56.png" /></figure>
Custom Mapping: reuse existing vocabularies

Large variety of existing vocabularies

But may be difficult to find the appropriate one

Partial coverage of the domain

Granularity: too high (cumbersome), too low (useless)

Different points of view

Frequently, a mixed approach is used

<figure><img src="image_57.png" /></figure>
# Agenda

<figure><img src="image_58.png" /></figure>

- Describe the translation of heterogeneous data into RDF

- Choose vocabularies to represent RDF data

- Access the RDF data produced

- The key importance of metadata

<figure><img src="image_59.png" /></figure>
Two approaches to translate existing data sources in RDF

<figure><img src="image_60.png" /></figure>

N★SQL

<table><thead><tr><td>ID</td><td>NAME</td></tr></thead><tbody><tr><td></td><td></td></tr><tr><td></td><td></td></tr></tbody></table>

<figure><img src="image_61.png" /></figure>

<figure><img src="image_62.png" /></figure>

Graph Materialization (ETL like)

<figure><img src="image_63.png" /></figure>

<figure><img src="image_64.png" /></figure>

SPARQL

<figure><img src="image_65.png" /></figure>

<figure><img src="image_66.png" /></figure>

<figure><img src="image_67.png" /></figure>

Query rewriting

<figure><img src="image_68.png" /></figure>

Virtual Graph

<figure><img src="image_69.png" /></figure>

SPARQL

<figure><img src="image_70.png" /></figure>

<figure><img src="image_71.png" /></figure>
A large variety of approaches

<figure><img src="image_72.png" /></figure>
<figure><img src="image_73.png" /></figure>

Describe the translation of heterogeneous data into RDF

Choose vocabularies to represent RDF data

Access the RDF data produced

The key importance of metadata
Making datasets **discoverable** and **reusable**
requires

**high-quality, comprehensive metadata**

<figure><img src="image_74.png" /></figure>
Metadata are the key to enable dataset reuse

<table><tr><td>Context</td><td>Identification, authors, dates, license, version, reference articles</td></tr><tr><td>Access</td><td>Format, structure, location (dwld), query method</td></tr><tr><td>Meaning</td><td>What do the data represent? What concepts, entities, semantics?</td></tr><tr><td>Interpretation</td><td>Units (cm or inches, left/right)...</td></tr><tr><td>Provenance</td><td>Acquired with which equipment, parameters, protocols?<br/>Derived from which dataset? With which processing?<br/>Dataset-level or entity-level provenance</td></tr><tr><td>Statistics</td><td>Number of triples per property of class, links to other datasets...</td></tr><tr><td>...</td><td></td></tr></table>

<figure><img src="image_75.png" /></figure>
Several works normalize metadata descriptions
and how to use metadata

* CSVW: CSV on the Web

* DCAT: Data Catalog Vocabulary
DCAT extensions, application profiles
W3C Dataset Exchange Working Group

* VoID: Vocabulary of Interlinked Datasets

* HCLS: Health Care & Life Sciences Dataset Profile

* ...

<figure><img src="image_76.png" /></figure>
<figure><img src="image_77.png" /></figure>

Thank
you!

<figure><img src="image_78.png" /></figure>