R2RML OVERVIEW
MAPPING A SIMPLE TABLE
CONTENT
R2RML ?
1
2
3
COMPUTING A PROPERTY WITH AN R2RML VIEW
4
LINKING TWO TABLES
5
CREATING RDF TERMS WITH TERM MAPS
6
2/8
R2RML (RDB to RDF Mapping Language ) is a
language enabling the creation of personalized
mappings from relational databases to RDF datasets.
The input of an R2RML mapping (M) is a relational
schema (R) and a set of instances (i) of (R). The output
is an RDF graph.
R2RML mappings are expressed as RDF graphs in
Turtle syntax. The flexibility of R2RML allows for
various implementation options, such as virtual
SPARQL endpoints, RDF dumps generation, or the
provision of a Linked Data interface.
3/8
RELATIONAL
RDF
R2RML
R2RML OVERVIEW
An R2RML mapping consists of a set of Triple Maps.
Each logical table is mapped to RDF using a Triples map which is a rule
that maps each row in the logical table to a number of RDF triples.
Each TripleMaps consists of :
1- exactly one LogicalTable
2- exactly one SubjectMap :that generates the subject of all RDF triples
from a logical table row.
3- set (which may be empty) of Predicate-Object Maps. which is a pair
of PredicateMap and ObjectMap which generates the RDF terms for the
predicate and object respectively of a triple, that is associated to the
subject generated by the SubjectMap
A LogicalTable :is either an existing table/view in the database or a SQL
query (known also as an R2RML view)
4/8
MAPPING A SIMPLE TABLE
5/8
COMPUTING A PROPERTY WITH AN R2RML VIEW
6/8
LINKING TWO TABLES
7/8
LINKING TWO TABLES
7/8
CREATING RDF TERMS WITH TERM MAPS
An RDF term is either an IRI, or a blank node, or a literal.
SubjectMap, PredicateMap and ObjectMap are all Term Maps which is a function
that generates an RDF term from the database.
There are three ways of creating an RDF term.
1) Template-valued Term Map. using the keyword rr:template
2) Constant-valued Term Map, put the constat directly
3) Column-valued Term Map, using the keyword rr:column
8/8
THANK YOU FOR LISTENING!

presentation sur r2rml from relational databse to relationel

  • 1.
    R2RML OVERVIEW MAPPING ASIMPLE TABLE CONTENT R2RML ? 1 2 3 COMPUTING A PROPERTY WITH AN R2RML VIEW 4 LINKING TWO TABLES 5 CREATING RDF TERMS WITH TERM MAPS 6 2/8
  • 2.
    R2RML (RDB toRDF Mapping Language ) is a language enabling the creation of personalized mappings from relational databases to RDF datasets. The input of an R2RML mapping (M) is a relational schema (R) and a set of instances (i) of (R). The output is an RDF graph. R2RML mappings are expressed as RDF graphs in Turtle syntax. The flexibility of R2RML allows for various implementation options, such as virtual SPARQL endpoints, RDF dumps generation, or the provision of a Linked Data interface. 3/8 RELATIONAL RDF R2RML
  • 3.
    R2RML OVERVIEW An R2RMLmapping consists of a set of Triple Maps. Each logical table is mapped to RDF using a Triples map which is a rule that maps each row in the logical table to a number of RDF triples. Each TripleMaps consists of : 1- exactly one LogicalTable 2- exactly one SubjectMap :that generates the subject of all RDF triples from a logical table row. 3- set (which may be empty) of Predicate-Object Maps. which is a pair of PredicateMap and ObjectMap which generates the RDF terms for the predicate and object respectively of a triple, that is associated to the subject generated by the SubjectMap A LogicalTable :is either an existing table/view in the database or a SQL query (known also as an R2RML view) 4/8
  • 4.
  • 5.
    COMPUTING A PROPERTYWITH AN R2RML VIEW 6/8
  • 6.
  • 7.
  • 8.
    CREATING RDF TERMSWITH TERM MAPS An RDF term is either an IRI, or a blank node, or a literal. SubjectMap, PredicateMap and ObjectMap are all Term Maps which is a function that generates an RDF term from the database. There are three ways of creating an RDF term. 1) Template-valued Term Map. using the keyword rr:template 2) Constant-valued Term Map, put the constat directly 3) Column-valued Term Map, using the keyword rr:column 8/8
  • 9.
    THANK YOU FORLISTENING!

Editor's Notes

  • #3  r2rml mapping consistes of a set of triplemaps ,for each table in the our database we create a triplemap, which convert each row in this table to a number of rdf tiples , so the triplemap consiste of three main parts , first the logicaltable for spicifing the table of the database , secondly we have subjectmap , which generate for each row a subject of the triple , the last part is a set of pridicateobjectmap which create the pridicate and the object for the subject created by the subject map
  • #4 The following example database consists of two tables, EMP and DEPT, with one row for each one of them :
  • #6 To complete the mapping of our example, we need to map the employees and their departments. We can achieve this by adding a new PredicateObjectMap wich join the subject of the triplemap1 to the subject of the triplemap2 that satisfais the joincondition in the joincondition we declare the the column of the child logical table and column in the parent logical table to compare between them
  • #7  as we can see here the employeer number 7369 has connected to his depertemt number 10
  • #8  In <#TriplesMap1>, the SubjectMap is a Template-valued Term Map because it generates an IRI from a template and the value of the "empno" column. The PredicateMap is a Constant-valued Term Map because it generates a constant IRI: ex:name. The ObjectMap is a Column-valued Term Map because it generates a Literal from the value of the "ename" column.