RDB2RDF Working Group Cunxin Jia. Why Mapping RDBs to RDF?

Slides:



Advertisements
Similar presentations
9 Creating and Managing Tables. Objectives After completing this lesson, you should be able to do the following: Describe the main database objects Create.
Advertisements

RDF and RDB 1 Some slides adapted from a presentation by Ivan Herman at the Semantic Technology & Business Conference, 2012.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
Semantic Web Introduction
RDF and RDB 1 Some slides adapted from a presentation by Ivan Herman at the Semantic Technology & Business Conference, 2012.
Copyright  Oracle Corporation, All rights reserved. 10 Creating and Managing Tables.
The work proposed in this study is an attempt to use Semantic Web technologies for integrating patient clinical data derived from Electronic Health Records.
1 Semantic Web and Retrieval of Scientific Data Semantics Goran Soldar University of Brighton UK Dan Smith University of East Anglia UK.
Benelux Semantic Web Meetup, Amsterdam Ivan Herman, W3C.
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Publishing data on the Web (with.
Materializing the Web of Linked Data
RDF: Concepts and Abstract Syntax W3C Recommendation 10 February Michael Felderer Digital Enterprise.
Chapter 2 Technical Background Technical Background NIKOLAOS KONSTANTINOU DIMITRIOS-EMMANUEL SPANOS Materializing the Web of Linked Data.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
An Approach for the Incremental Export of Relational Databases into RDF Graphs N. Konstantinou, D.-E. Spanos, D. Kouis, N. Mitrou National Technical University.
Relational Databases to RDF (a.k.a RDB2RDF) Juan F. Sequeda Dept of Computer Science University of Texas at Austin.
Master Informatique 1 Semantic Technologies Part 11Direct Mapping Werner Nutt.
Oracle Data Definition Language (DDL) Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Dr. Philip Cannata 1 Programming Languages Prolog Part 3 SQL & Prolog.
On the Semantics of R2RML and its Relationship with the Direct Mapping Juan F. Sequeda Research in Bioinformatics and Semantic Web (RiBS) Lab Department.
Unit 6 Data Storage Design. Key Concepts 1. Database overview 2. SQL review 3. Designing fields 4. Denormalization 5. File organization 6. Object-relational.
SQL FUNDAMENTALS SQL ( Structured Query Language )
10 Creating and Managing Tables Objectives At the end of this lesson, you will be able to: Describe the main database objects Create tables Describe.
SQL- DQL (Oracle Version). 2 SELECT Statement Syntax SELECT [DISTINCT] column_list FROM table_list [WHERE conditional expression] [GROUP BY column_list]
9 Copyright © Oracle Corporation, All rights reserved. Creating and Managing Tables.
Copyright  Oracle Corporation, All rights reserved. 10 Creating and Managing Tables.
SQL: Part 1 Original materials supplied by the Oracle Academic Initiative (OAI). Edited for classroom use by Professor Laku Chidambaram. Not for commercial.
1 Writing Basic SQL Statements. 1-2 Objectives At the end of this lesson, you should be able to: List the capabilities of SQL SELECT statements Execute.
Displaying Data from Multiple Tables (SQL99 Syntax with examples)
9 Copyright © Oracle Corporation, All rights reserved. Creating and Managing Tables.
1 © The ATHENA Consortium. Resource Description Framework (RDF) A language for making simple statements about things (resources) Statements:
An Introduction To SQL Part 2 (Special thanks to Geoff Leese)
1 Information Retrieval and Use (IRU) An Introduction To SQL Part 2.
Doc.: IEEE /0169r0 Submission Joe Kwak (InterDigital) Slide 1 November 2010 Slide 1 Overview of Resource Description Framework (RFD/XML) Date:
RDF Syntax and examples ดร. มารุต บูรณรัช : หัวข้อพิเศษด้านเทคโนโลยีสารสนเทศขั้นสูง - เทคโนโลยีเว็บเชิงความหมาย.
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Object-Relational Database Programming.
RDF and Relational Databases
9-1 © Prentice Hall, 2007 Topic 9: Physical Database Design Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Relational State Assertions These slides.
Creating and Managing Tables 14. ObjectivesObjectives After completing this lesson, you should be able to do the following: After completing this lesson,
Lecture 2 21/1/16. Putting the output in order Oracle can sort a column, or multiple columns select emp_no, emp_name from employee order by emp_name;
CSCI N311: Oracle Database Programming 5-1 Chapter 15: Changing Data: insert, update, delete Insert Rollback Commit Update Delete Insert Statement –Allows.
Writing Basic SQL Statements. Objectives After completing this lesson, you should be able to do the following: –List the capabilities of SQL SELECT statements.
LECTURE FOUR Introduction to SQL DDL with tables DML with tables.
1 ORACLE I 3 – SQL 1 Salim Phone: YM: talim_bansal.
Copyright س Oracle Corporation, All rights reserved. 1 Writing Basic SQL Statements.
Fundamentals of DBMS Notes-1.
Including Constraints
Marut Buranarach Language and Semantic Technology Laboratory
RDF and RDB 1 Some slides adapted from a presentation by Ivan Herman at the Semantic Technology & Business Conference, 2012.
Nikolaos Konstantinou Nikos Houssos Anastasia Manta
Middleware independent Information Service
Manipulating Data Schedule: Timing Topic 40 minutes Lecture
Writing Correlated Subqueries
ORACLE SQL Developer & SQLPLUS Statements
Logics for Data and Knowledge Representation
CS4222 Principles of Database System
CC La Web de Datos Primavera 2016 Lecture 2: RDF Model & Syntax
RDF 1.1 Concepts and Abstract Syntax
(SQL) Manipulating Data
These are slides from Dr. Phil Cannata’s Class
JSON-LD 1.0 Yanan Zhang.
Oracle Data Definition Language (DDL)
Publishing Ordnance Survey Ireland's geospatial data as Linked Data
Relational Database Design
JSON for Linked Data: a standard for serializing RDF using JSON
Session - 6 Sequence - 1 SQL: The Structured Query Language:
Creating a Virtual Knowledge Base for Financial Risk and Reporting
A SPARQL extension for generating RDF from heterogeneous formats
Presentation transcript:

RDB2RDF Working Group Cunxin Jia

Why Mapping RDBs to RDF?

W3C RDB2RDF Working Group The mission of the RDB2RDF Working Group, part of the Semantic Web Activity, is to standardize languages for mapping relational data and relational database schemas into RDF and OWL.Semantic Web Activity Direct Mapping (DM) RDB2RDF Mapping Language (R2RML).

Milestone SpecificationFPWDLCCRPR Rec, WG Note, Wiki page Working Draft Candidate Recommendation Proposed Recommendation R2RML2010/92011/92011/ /3 2012/8/ /6 (Rec) Direct Mapping 2010/92011/92011/ /3 2012/8/ /6 (Rec) R2RML Test Cases 2010/92012/1 2012/3 (Wiki pages) Direct Mapping Test Cases 2010/92012/1 2012/3 (Wiki pages)

R2RML: RDB to RDF Mapping Language A language for expressing customized mappings from relational databases to RDF datasets. Expressed as RDF graphs and written down in Turtle syntax. Input: RDB Output: RDF dataset

Example Input Database EMPNO INTEGER PRIMARY KEY ENAME VARCHAR(100) JOB VARCHAR(20) DEPTNO INTEGER REFERENCES DEPT (DEPTNO) 7369SMITHCLERK10 DEPTNO INTEGER PRIMARY KEY DNAME VARCHAR(30) LOC VARCHAR(100) 10APPSERVERNEW YORK EMP DEPT

Desired RDF Output rdf:type ex:Employee. ex:name "SMITH". ex:department. rdf:type ex:Department. ex:name "APPSERVER". ex:location "NEW YORK". ex:staff 1. < rdf:type ex:Employee. < ex:name "SMITH". < ex:department < < rdf:type ex:Department. < ex:name "APPSERVER". < ex:location "NEW YORK". < ex:staff 1.

Mapping a Simple ex:. rr:logicalTable [ rr:tableName "EMP" ]; rr:subjectMap [ rr:template " rr:class ex:Employee; ]; rr:predicateObjectMap [ rr:predicate ex:name; rr:objectMap [ rr:column "ENAME" ]; ex:. rr:logicalTable [ rr:tableName "EMP" ]; rr:subjectMap [ rr:template " rr:class ex:Employee; ]; rr:predicateObjectMap [ rr:predicate ex:name; rr:objectMap [ rr:column "ENAME" ]; ]. rdf:type ex:Employee. ex:name "SMITH".

Computing a Property with an R2RML View rr:sqlQuery """ SELECT DEPTNO, DNAME, LOC, (SELECT COUNT(*) FROM EMP WHERE EMP.DEPTNO=DEPT.DEPTNO) AS STAFF FROM DEPT; """. rr:sqlQuery """ SELECT DEPTNO, DNAME, LOC, (SELECT COUNT(*) FROM EMP WHERE EMP.DEPTNO=DEPT.DEPTNO) AS STAFF FROM DEPT; """. rr:logicalTable ; rr:subjectMap [ rr:template " rr:class ex:Department; ]; rr:predicateObjectMap [ rr:predicate ex:name; rr:objectMap [ rr:column "DNAME" ]; ]; rr:predicateObjectMap [ rr:predicate ex:location; rr:objectMap [ rr:column "LOC" ]; ]; rr:predicateObjectMap [ rr:predicate ex:staff; rr:objectMap [ rr:column "STAFF" ]; ]. rr:logicalTable ; rr:subjectMap [ rr:template " rr:class ex:Department; ]; rr:predicateObjectMap [ rr:predicate ex:name; rr:objectMap [ rr:column "DNAME" ]; ]; rr:predicateObjectMap [ rr:predicate ex:location; rr:objectMap [ rr:column "LOC" ]; ]; rr:predicateObjectMap [ rr:predicate ex:staff; rr:objectMap [ rr:column "STAFF" ]; ]. rdf:type ex:Department. ex:name "APPSERVER". ex:location "NEW YORK". ex:staff 1.

Linking Two Tables rr:predicateObjectMap [ rr:predicate ex:department; rr:objectMap [ rr:parentTriplesMap ; rr:joinCondition [ rr:child "DEPTNO"; rr:parent "DEPTNO"; ]; ]. rr:predicateObjectMap [ rr:predicate ex:department; rr:objectMap [ rr:parentTriplesMap ; rr:joinCondition [ rr:child "DEPTNO"; rr:parent "DEPTNO"; ]; ]. ex:department.

R2RML vocabulary rr :. rr:TriplesMap is the class of triples maps.triples maps rr:LogicalTable is the class of logical tables. It has two subclasses:logical tables rr:R2RMLView is the class of R2RML views.R2RML views rr:BaseTableOrView is the class of SQL base tables or views.SQL base tables or views rr:TermMap is the class of term maps. It has four subclasses:term maps rr:SubjectMap is the class of subject maps.subject maps rr:PredicateMap is the class of predicate maps.predicate maps rr:ObjectMap is the class of object maps.object maps rr:GraphMap is the class of graph maps.graph maps rr:PredicateObjectMap is the class of predicate-object maps.predicate-object maps rr:RefObjectMap is the class of referencing object maps.referencing object maps rr:Join is the class of join conditions.join conditions

Triples Map [] rr:logicalTable [ rr:tableName "DEPT" ]; rr:subjectMap [ rr:template " ]; rr:predicateObjectMap [ rr:predicate ex:name; rr:objectMap [ rr:column "DNAME" ]; ]; rr:predicateObjectMap [ rr:predicate ex:location; rr:objectMap [ rr:column "LOC" ]; ]. [] rr:logicalTable [ rr:tableName "DEPT" ]; rr:subjectMap [ rr:template " ]; rr:predicateObjectMap [ rr:predicate ex:name; rr:objectMap [ rr:column "DNAME" ]; ]; rr:predicateObjectMap [ rr:predicate ex:location; rr:objectMap [ rr:column "LOC" ]; ]. Exactly one rr:logicalTable Exactly one rr:subjectMap Zero or more rr:predicateObjectMap

Logical Table rr:sqlQuery """ SELECT DEPTNO, DNAME, LOC, (SELECT COUNT(*) FROM EMP WHERE EMP.DEPTNO=DEPT.DEPTNO) AS STAFF FROM DEPT; """. rr:sqlQuery """ SELECT DEPTNO, DNAME, LOC, (SELECT COUNT(*) FROM EMP WHERE EMP.DEPTNO=DEPT.DEPTNO) AS STAFF FROM DEPT; """. A SQL base table or view An R2RML view

Subject Map [] rr:template " rr:class ex:Employee. [] rr:template " rr:class ex:Employee. A template to generate IRI for each row Class IRIs

PredicateObject Map One or more predicate maps. One or more object maps or referencing object maps. rr:predicateObjectMap [ rr:predicate ex:location; rr:objectMap [ rr:column "LOC" ]; ]. rr:predicateObjectMap [ rr:predicate ex:location; rr:objectMap [ rr:column "LOC" ]; ]. rr:predicateObjectMap [ rr:predicate ex:department; rr:objectMap [ rr:parentTriplesMap ; rr:joinCondition [ rr:child "DEPTNO"; rr:parent "DEPTNO"; ]; ]. rr:predicateObjectMap [ rr:predicate ex:department; rr:objectMap [ rr:parentTriplesMap ; rr:joinCondition [ rr:child "DEPTNO"; rr:parent "DEPTNO"; ]; ].

Natural RDF literal SQL datatypeRDF datatype Lexical transformation (informative) BINARY, BINARY VARYING, BINARY LARGE OBJECT xsd:hexBinary xsd:hexBinary lexical mapping NUMERIC, DECIMALxsd:decimalnone required SMALLINT, INTEGER, BIGINT xsd:integernone required FLOAT, REAL, DOUB LE PRECISION xsd:doublenone required BOOLEANxsd:boolean ensure lowercase (true, false) DATExsd:datenone required TIMExsd:timenone required TIMESTAMPxsd:dateTime replace space character with “T” INTERVALundefined

An overview of R2RML

DM:A Direct Mapping of Relational Data to RDF The direct mapping defines a simple transformation. R2RML defines a relaxed variant of the Direct Mapping intended as a default mapping for further customization. Input: RDB Output: RDF graph

Example Input Database ID INTEGER PRIMARY KEY fname VARCHAR(10) addr INTEGER REFERENCES Address(ID) 7Bob18 8SueNULL ID INTEGER PRIMARY KEY city VARCHAR(10) state VARCHAR(2) 18CambridgeMA People Address

Desired xsd:. rdf:type. 7. "Bob" rdf:type. 8. "Sue". rdf:type xsd:. rdf:type. 7. "Bob" rdf:type. 8. "Sue". rdf:type. 18. "Cambridge". "MA".

An overview of DM

R2RML vs. DM R2RML is customized. DM is default and automatic.

The End