MIRROR: Automatic R2RML Mapping
Generation from Relational
Databases
Luciano
Frontino de
Medeiros
Freddy Priyatna
Oscar Corcho
The 15th International Conference on Web Engineering
June 25th, 2015
Rotterdam, the Netherlands
Outline
1. Background & Motivation
2. Patterns Extraction
3. Mappings Generation
4. Experimentation
5. Conclusion
2
RDB2RDF
3
● Two worlds
o Relational Database (RDB) for storing information
 rows, tables
o Resource Description Framework (RDF) for sharing
information
 triples, graphs
● RDB2RDF and W3C
Direct Mapping
● Table URIs
o <ex.com/Student>
● Row nodes
o <Student/ID=10>
● Row type triples
o <Student/ID=10> <rdf:type> Student
● Literal triples
o <Sport/ID=110> <Sport#Description> “Tennis”.
● Reference triples
o <Student_Sport/ID_Student=10;ID_Sport=110> <Student_Sport#ref-ID_Student>
<Student/ID=10> .
4
http://www.w3.org/TR/rdb-direct-mapping/
Direct Mapping Example
Student
ID
(PK)
FirstName LastName
10 Venus Williams
11 Fernando Alonso
12 David Villa
Sport
ID
(PK)
Description
110 Tennis
111 Football
112 Formula1
Student_Sport
ID_Student
(PFK)
ID_Sport
(PFK)
10 110
11 111
11 112
12 111
5
<Student/ID=11>
<Student>
11
Fernando Alonso
rdf:type
<Student/ID>
<Student/LastName>
<Student/FirstName>
R2RML
● Customized mappings
● Triples Map
o Logical Table
o Subject Map
o Predicate Object Map
 Predicate Map
 Object Map
 Reference Object Map
● Term Map
o constant
o column
o template
6
http://www.w3.org/TR/r2rml/
R2RML Example
Student
ID
(PK)
FirstName LastName
10 Venus Williams
11 Fernando Alonso
12 David Villa
7
<Estudiante/11>
<Estudiante>
Fernando Alonso
rdf:type
ex:fullName
<#TriplesMap1>
rr:logicalTable [ rr:tableName "Student" ];
rr:subjectMap [
rr:template "http://data.example.com/Estudiante/{ID}";
rr:class ex:Estudiante;
];
rr:predicateObjectMap [
rr:predicate ex:fullName;
rr:objectMap [ rr:template "{FirstName} {LastName}" ];
].
Background: M-N Relationship
Expected Triples
Student
ID
(PK)
FirstName LastName
10 Venus Williams
11 Fernando Alonso
12 David Villa
Sport
ID
(PK)
Description
110 Tennis
111 Football
112 Formula1
Student_Sport
ID_Student
(PFK)
ID_Sport
(PFK)
10 110
11 111
11 112
12 111
8
<Student/ID=11>
<Sport/ID=111>
<Sport/ID=112>
<Student#hasSport>
<Student#hasSport>
Background: 1-N Relationship
Expected Triples
Student
ID
(PK)
FirstName LastName
10 Venus Williams
11 Fernando Alonso
12 David Villa
Sport
ID
(PK)
Description
110 Tennis
111 Football
112 Formula1
Student_Sport
ID_Student
(PFK)
ID_Sport
(PFK)
10 110
11 111
11 112
12 111
Contact
CID
(PK)
SID
(FK)
Email
1 10 venus@hotmail.com
2 10 venus@gmail.com
3 11 fernando@yahoo.com
4 12 david@msn.com
9
<Student/ID=10>
<Contact/ID=2>
<Student#hasContact> <Contact/ID=1>
<Student#hasContact>
Background: IsA Relationship
Expected Triples
Student
ID
(PFK)
FirstName LastName
10 Venus Williams
11 Fernando Alonso
12 David Villa
Sport
ID
(PK)
Description
110 Tennis
111 Football
112 Formula1
Student_Sport
ID_Student
(PFK)
ID_Sport
(PFK)
10 110
11 111
11 112
12 111
Person
ID
(PK)
SSN
10 1234510
11 1234511
12 1234512
10
<Student/ID=10>
1234510
rdf:type
<Student#SSN>
<Person>
Goal
● To automatically generate R2RML mappings
that:
o simulate DM rules
o encodes relationship in database
11
PINKEL, Christoph, et al.
RODI: A Benchmark for Automatic Mapping Generation in
Relational-to-Ontology Data Integration.
Extended Semantic Web Conference 2015
MIRROR: Overview
1. Extraction of tables and its relationship
2. Mappings generation
12
Pruning Relationship
Types
1 2 3 4 5 6 7 8
Parent (Mand, 1) (Mand, 1) (Mand, 1) (Mand, 1) (Mand, N) (Mand, N) (Mand, N) (Mand, N)
Child (Mand, 1) (Mand, N) (Opt,1) (Opt, N) (Mand, 1) (Mand, N) (Opt,1) (Opt, N)
9 10 11 12 13 14 15 16
Parent (Opt, 1) (Opt, 1) (Opt, 1) (Opt, 1) (Opt, N) (Opt, N) (Opt, N) (Opt, N)
Child (Mand, 1) (Mand, N) (Opt,1) (Opt, N) (Mand, 1) (Mand, N) (Opt,1) (Opt, N)
Reflexive Property
● 2 = 5
● 3 = 9
● 4 = 13
● 7 = 10
● 8 = 14
● 12 = 15
13
Primary key is not null
and unique
Correspondences between
models
14
Mappings Generation
15
Implementation & Experimentation
● Implementation
o https://github.com/oeg-upm/MIRROR
o morph-RDB integration
 https://github.com/oeg-upm/morph-rdb
o Any R2RML engine
● Goal
o 1st set mappings -> DM triples
o 2nd mappings -> relationship triples
● Dataset
o W3C DM Testcases
 26 databases (D000 - D025)
o Extension of D011
 1-N
 M-N relationship
 ISA relationship 16
D011 Extension
● 1-N
o Student - Contact
● IsA
o Student - Person
17
D011: Generated Mappings
1st Set -> DM Triples
18
D011 Outputs
DM
19
MIRROR + morph-RDB
D011: Generated Mappings
2nd Set -> M-N Relationship
20
<Sport/110> <SportHasStudent> <Student/10> .
<Sport/111> <SportHasStudent> <Student/11> .
<Sport/111> <SportHasStudent> <Student/12> .
<Sport/112> <SportHasStudent> <Student/11> .
D011 Extension: Generated Mappings
2nd Set -> 1-N Relationship
<Student/10> <StudenthasContact> <Contact/1> .
<Student/10> <StudenthasContact> <Contact/2> .
<Student/11> <StudenthasContact> <Contact/3> .
<Student/12> <StudenthasContact> <Contact/4> .
21
D011 Extension: Generated Mappings
2nd Set -> IsA & inherited properties
<Student/10> <rdf:type> <Person> .
<Student/10> <Student#ssn> 1234510 .
<Student/11> <rdf:type> <Person> .
<Student/11> <Student#ssn> 1234511 .
<Student/12> <rdf:type> <Person> .
<Student/12> <Student#ssn> 1234512 . 22
Conclusion
● R2RML Mappings Generator
o Implemented as MIRROR
o Integrated with morph-RDB
● 2 Sets of Generated Mappings
o Direct Mapping Triples
o Encoded Relationship in a Database Schema
● Evaluation
o Direct Mapping Test Cases
o Extension of D011
23
MIRROR: Automatic R2RML Mapping
Generation from Relational
Databases
Luciano
Frontino de
Medeiros
Freddy Priyatna
Oscar Corcho

More Related Content

PPTX
Athan zafirov
PDF
PDF
WEEK 4. Curators: Methodology 1.5
PPTX
SWT Lecture Session 11 - R2RML part 2
PPTX
SWT Lecture Session 10 R2RML Part 1
PPTX
RDB2RDF Tutorial (R2RML and Direct Mapping) at ISWC 2013
PPTX
Relational Database to RDF (RDB2RDF)
PDF
RDB2RDF, an overview of R2RML and Direct Mapping
Athan zafirov
WEEK 4. Curators: Methodology 1.5
SWT Lecture Session 11 - R2RML part 2
SWT Lecture Session 10 R2RML Part 1
RDB2RDF Tutorial (R2RML and Direct Mapping) at ISWC 2013
Relational Database to RDF (RDB2RDF)
RDB2RDF, an overview of R2RML and Direct Mapping

Similar to (Semantic Web Technologies and Applications track) "MIRROR: Automatic R2RML Mapping Generation from Relational Databases" - Luciano Frontino De Medeiros, Freddy Priyatna and Oscar Corcho (20)

PDF
Generating Executable Mappings from RDF Data Cube Data Structure Definitions
PDF
On_Mapping_Relational_Databases_to_RDF_and_SHACL.pdf
PDF
R2RML-F: Towards Sharing and Executing Domain Logic in R2RML Mappings
PDF
Translation of Relational and Non-Relational Databases into RDF with xR2RML
PPTX
Incremental Export of Relational Database Contents into RDF Graphs
PPTX
Aeneas:: An Extensible NoSql Enhancing Application System
PPTX
Semantic Web and Related Work at W3C
PDF
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
PPTX
An Approach for the Incremental Export of Relational Databases into RDF Graphs
PPTX
Data Integration at the Ontology Engineering Group
PPTX
presentation sur r2rml from relational databse to relationel
PPTX
No sql for sql professionals
PDF
Relationships are hard
PDF
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
PPT
Phil Coleman Presentation
KEY
Non-Relational Databases at ACCU2011
PDF
A Review on RDB to RDF Mapping for Semantic Web
PDF
A REVIEW ON RDB TO RDF MAPPING FOR SEMANTIC WEB
PDF
A REVIEW ON RDB TO RDF MAPPING FOR SEMANTIC WEB
PPTX
SWT Lecture Session 9 - RDB2RDF direct mapping
Generating Executable Mappings from RDF Data Cube Data Structure Definitions
On_Mapping_Relational_Databases_to_RDF_and_SHACL.pdf
R2RML-F: Towards Sharing and Executing Domain Logic in R2RML Mappings
Translation of Relational and Non-Relational Databases into RDF with xR2RML
Incremental Export of Relational Database Contents into RDF Graphs
Aeneas:: An Extensible NoSql Enhancing Application System
Semantic Web and Related Work at W3C
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
An Approach for the Incremental Export of Relational Databases into RDF Graphs
Data Integration at the Ontology Engineering Group
presentation sur r2rml from relational databse to relationel
No sql for sql professionals
Relationships are hard
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
Phil Coleman Presentation
Non-Relational Databases at ACCU2011
A Review on RDB to RDF Mapping for Semantic Web
A REVIEW ON RDB TO RDF MAPPING FOR SEMANTIC WEB
A REVIEW ON RDB TO RDF MAPPING FOR SEMANTIC WEB
SWT Lecture Session 9 - RDB2RDF direct mapping
Ad

More from icwe2015 (19)

PDF
Mikkonen liquid-sw-icwe2015
PDF
(Web User Interfaces track) "Getting the Query Right: User Interface Design o...
PDF
(Web Application Design track) "Two Factor Authentication Made Easy" - Alex Q...
PDF
(Linked Data Development and Exploitation track) "YQL as a Platform for Linke...
PDF
(Linked Data Interfaces and Querying track) "SUMMA: A Common API for Linked D...
PDF
(Linked Data Development and Exploitation track) "Generating the Semantic Sna...
PPTX
(Industry track) "Interactive networks for digital cultural heritage collecti...
PDF
(SoWeMine Workshop) "#nowplaying on #Spotify: Leveraging Spotify Information ...
PPTX
(Mobile Web Applications track) "Mobile-IDM: A Design Method for Modeling the...
PDF
(Linked Data Development and Exploitation track) "Curtains Up! Lights, Camera...
PPTX
(Mobile Web Applications track) "Profiling User Activities with Minimal Traff...
PPTX
(SoWeMine Workshop) "Retrieving Relevant and Interesting Tweets during Live T...
PDF
(NLPIT Workshop) (Keynote) Nathan Schneider - “Hacking a Way Through the Twit...
PDF
(PEWET Workshop) (Keynote) Vincenzo De Florio - “Fractally-organized Connecti...
PDF
(Web Application Design track) "Liquid Stream Processing across Web Browsers ...
PDF
(Web Composition and Mashups track) "REST Web Service Description for Graph-B...
PDF
(Semantic Web Technologies and Applications track) "A Quantitative Comparison...
PPTX
(Keynote) Peter Mika - “Making the Web Searchable”
PDF
(Keynote) Mike Thelwall - “Sentiment Strength Detection for Social Media Text...
Mikkonen liquid-sw-icwe2015
(Web User Interfaces track) "Getting the Query Right: User Interface Design o...
(Web Application Design track) "Two Factor Authentication Made Easy" - Alex Q...
(Linked Data Development and Exploitation track) "YQL as a Platform for Linke...
(Linked Data Interfaces and Querying track) "SUMMA: A Common API for Linked D...
(Linked Data Development and Exploitation track) "Generating the Semantic Sna...
(Industry track) "Interactive networks for digital cultural heritage collecti...
(SoWeMine Workshop) "#nowplaying on #Spotify: Leveraging Spotify Information ...
(Mobile Web Applications track) "Mobile-IDM: A Design Method for Modeling the...
(Linked Data Development and Exploitation track) "Curtains Up! Lights, Camera...
(Mobile Web Applications track) "Profiling User Activities with Minimal Traff...
(SoWeMine Workshop) "Retrieving Relevant and Interesting Tweets during Live T...
(NLPIT Workshop) (Keynote) Nathan Schneider - “Hacking a Way Through the Twit...
(PEWET Workshop) (Keynote) Vincenzo De Florio - “Fractally-organized Connecti...
(Web Application Design track) "Liquid Stream Processing across Web Browsers ...
(Web Composition and Mashups track) "REST Web Service Description for Graph-B...
(Semantic Web Technologies and Applications track) "A Quantitative Comparison...
(Keynote) Peter Mika - “Making the Web Searchable”
(Keynote) Mike Thelwall - “Sentiment Strength Detection for Social Media Text...
Ad

Recently uploaded (20)

PDF
Buy Cash App Verified Accounts Instantly – Secure Crypto Deal.pdf
PDF
Lean-Manufacturing-Tools-Techniques-and-How-To-Use-Them.pdf
PPTX
Internet Safety for Seniors presentation
PDF
mera desh ae watn.(a source of motivation and patriotism to the youth of the ...
PPTX
The-Importance-of-School-Sanitation.pptx
PDF
Containerization lab dddddddddddddddmanual.pdf
PDF
Course Overview and Agenda cloud security
PPTX
Artificial_Intelligence_Basics use in our daily life
PDF
Session 1 (Week 1)fghjmgfdsfgthyjkhfdsadfghjkhgfdsa
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PDF
Uptota Investor Deck - Where Africa Meets Blockchain
PPT
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
PPT
12 Things That Make People Trust a Website Instantly
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
DOCX
Memecoinist Update: Best Meme Coins 2025, Trump Meme Coin Predictions, and th...
PDF
KEY COB2 UNIT 1: The Business of businessĐH KInh tế TP.HCM
PDF
Virtual Guard Technology Provider_ Remote Security Service Solutions.pdf
PDF
Understand the Gitlab_presentation_task.pdf
PDF
Computer Networking, Internet, Casting in Network
PDF
Exploring The Internet Of Things(IOT).ppt
Buy Cash App Verified Accounts Instantly – Secure Crypto Deal.pdf
Lean-Manufacturing-Tools-Techniques-and-How-To-Use-Them.pdf
Internet Safety for Seniors presentation
mera desh ae watn.(a source of motivation and patriotism to the youth of the ...
The-Importance-of-School-Sanitation.pptx
Containerization lab dddddddddddddddmanual.pdf
Course Overview and Agenda cloud security
Artificial_Intelligence_Basics use in our daily life
Session 1 (Week 1)fghjmgfdsfgthyjkhfdsadfghjkhgfdsa
Alethe Consulting Corporate Profile and Solution Aproach
Uptota Investor Deck - Where Africa Meets Blockchain
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
12 Things That Make People Trust a Website Instantly
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
Memecoinist Update: Best Meme Coins 2025, Trump Meme Coin Predictions, and th...
KEY COB2 UNIT 1: The Business of businessĐH KInh tế TP.HCM
Virtual Guard Technology Provider_ Remote Security Service Solutions.pdf
Understand the Gitlab_presentation_task.pdf
Computer Networking, Internet, Casting in Network
Exploring The Internet Of Things(IOT).ppt

(Semantic Web Technologies and Applications track) "MIRROR: Automatic R2RML Mapping Generation from Relational Databases" - Luciano Frontino De Medeiros, Freddy Priyatna and Oscar Corcho

  • 1. MIRROR: Automatic R2RML Mapping Generation from Relational Databases Luciano Frontino de Medeiros Freddy Priyatna Oscar Corcho The 15th International Conference on Web Engineering June 25th, 2015 Rotterdam, the Netherlands
  • 2. Outline 1. Background & Motivation 2. Patterns Extraction 3. Mappings Generation 4. Experimentation 5. Conclusion 2
  • 3. RDB2RDF 3 ● Two worlds o Relational Database (RDB) for storing information  rows, tables o Resource Description Framework (RDF) for sharing information  triples, graphs ● RDB2RDF and W3C
  • 4. Direct Mapping ● Table URIs o <ex.com/Student> ● Row nodes o <Student/ID=10> ● Row type triples o <Student/ID=10> <rdf:type> Student ● Literal triples o <Sport/ID=110> <Sport#Description> “Tennis”. ● Reference triples o <Student_Sport/ID_Student=10;ID_Sport=110> <Student_Sport#ref-ID_Student> <Student/ID=10> . 4 http://www.w3.org/TR/rdb-direct-mapping/
  • 5. Direct Mapping Example Student ID (PK) FirstName LastName 10 Venus Williams 11 Fernando Alonso 12 David Villa Sport ID (PK) Description 110 Tennis 111 Football 112 Formula1 Student_Sport ID_Student (PFK) ID_Sport (PFK) 10 110 11 111 11 112 12 111 5 <Student/ID=11> <Student> 11 Fernando Alonso rdf:type <Student/ID> <Student/LastName> <Student/FirstName>
  • 6. R2RML ● Customized mappings ● Triples Map o Logical Table o Subject Map o Predicate Object Map  Predicate Map  Object Map  Reference Object Map ● Term Map o constant o column o template 6 http://www.w3.org/TR/r2rml/
  • 7. R2RML Example Student ID (PK) FirstName LastName 10 Venus Williams 11 Fernando Alonso 12 David Villa 7 <Estudiante/11> <Estudiante> Fernando Alonso rdf:type ex:fullName <#TriplesMap1> rr:logicalTable [ rr:tableName "Student" ]; rr:subjectMap [ rr:template "http://data.example.com/Estudiante/{ID}"; rr:class ex:Estudiante; ]; rr:predicateObjectMap [ rr:predicate ex:fullName; rr:objectMap [ rr:template "{FirstName} {LastName}" ]; ].
  • 8. Background: M-N Relationship Expected Triples Student ID (PK) FirstName LastName 10 Venus Williams 11 Fernando Alonso 12 David Villa Sport ID (PK) Description 110 Tennis 111 Football 112 Formula1 Student_Sport ID_Student (PFK) ID_Sport (PFK) 10 110 11 111 11 112 12 111 8 <Student/ID=11> <Sport/ID=111> <Sport/ID=112> <Student#hasSport> <Student#hasSport>
  • 9. Background: 1-N Relationship Expected Triples Student ID (PK) FirstName LastName 10 Venus Williams 11 Fernando Alonso 12 David Villa Sport ID (PK) Description 110 Tennis 111 Football 112 Formula1 Student_Sport ID_Student (PFK) ID_Sport (PFK) 10 110 11 111 11 112 12 111 Contact CID (PK) SID (FK) Email 1 10 venus@hotmail.com 2 10 venus@gmail.com 3 11 fernando@yahoo.com 4 12 david@msn.com 9 <Student/ID=10> <Contact/ID=2> <Student#hasContact> <Contact/ID=1> <Student#hasContact>
  • 10. Background: IsA Relationship Expected Triples Student ID (PFK) FirstName LastName 10 Venus Williams 11 Fernando Alonso 12 David Villa Sport ID (PK) Description 110 Tennis 111 Football 112 Formula1 Student_Sport ID_Student (PFK) ID_Sport (PFK) 10 110 11 111 11 112 12 111 Person ID (PK) SSN 10 1234510 11 1234511 12 1234512 10 <Student/ID=10> 1234510 rdf:type <Student#SSN> <Person>
  • 11. Goal ● To automatically generate R2RML mappings that: o simulate DM rules o encodes relationship in database 11 PINKEL, Christoph, et al. RODI: A Benchmark for Automatic Mapping Generation in Relational-to-Ontology Data Integration. Extended Semantic Web Conference 2015
  • 12. MIRROR: Overview 1. Extraction of tables and its relationship 2. Mappings generation 12
  • 13. Pruning Relationship Types 1 2 3 4 5 6 7 8 Parent (Mand, 1) (Mand, 1) (Mand, 1) (Mand, 1) (Mand, N) (Mand, N) (Mand, N) (Mand, N) Child (Mand, 1) (Mand, N) (Opt,1) (Opt, N) (Mand, 1) (Mand, N) (Opt,1) (Opt, N) 9 10 11 12 13 14 15 16 Parent (Opt, 1) (Opt, 1) (Opt, 1) (Opt, 1) (Opt, N) (Opt, N) (Opt, N) (Opt, N) Child (Mand, 1) (Mand, N) (Opt,1) (Opt, N) (Mand, 1) (Mand, N) (Opt,1) (Opt, N) Reflexive Property ● 2 = 5 ● 3 = 9 ● 4 = 13 ● 7 = 10 ● 8 = 14 ● 12 = 15 13 Primary key is not null and unique
  • 16. Implementation & Experimentation ● Implementation o https://github.com/oeg-upm/MIRROR o morph-RDB integration  https://github.com/oeg-upm/morph-rdb o Any R2RML engine ● Goal o 1st set mappings -> DM triples o 2nd mappings -> relationship triples ● Dataset o W3C DM Testcases  26 databases (D000 - D025) o Extension of D011  1-N  M-N relationship  ISA relationship 16
  • 17. D011 Extension ● 1-N o Student - Contact ● IsA o Student - Person 17
  • 18. D011: Generated Mappings 1st Set -> DM Triples 18
  • 20. D011: Generated Mappings 2nd Set -> M-N Relationship 20 <Sport/110> <SportHasStudent> <Student/10> . <Sport/111> <SportHasStudent> <Student/11> . <Sport/111> <SportHasStudent> <Student/12> . <Sport/112> <SportHasStudent> <Student/11> .
  • 21. D011 Extension: Generated Mappings 2nd Set -> 1-N Relationship <Student/10> <StudenthasContact> <Contact/1> . <Student/10> <StudenthasContact> <Contact/2> . <Student/11> <StudenthasContact> <Contact/3> . <Student/12> <StudenthasContact> <Contact/4> . 21
  • 22. D011 Extension: Generated Mappings 2nd Set -> IsA & inherited properties <Student/10> <rdf:type> <Person> . <Student/10> <Student#ssn> 1234510 . <Student/11> <rdf:type> <Person> . <Student/11> <Student#ssn> 1234511 . <Student/12> <rdf:type> <Person> . <Student/12> <Student#ssn> 1234512 . 22
  • 23. Conclusion ● R2RML Mappings Generator o Implemented as MIRROR o Integrated with morph-RDB ● 2 Sets of Generated Mappings o Direct Mapping Triples o Encoded Relationship in a Database Schema ● Evaluation o Direct Mapping Test Cases o Extension of D011 23
  • 24. MIRROR: Automatic R2RML Mapping Generation from Relational Databases Luciano Frontino de Medeiros Freddy Priyatna Oscar Corcho