R2RML is a language for expressing customized mappings from relational databases to RDF datasets.
R2RML is a language for expressing customized mappings from relational databases to RDF datasets.
An R2RML mapping refers to logical tables to retrieve data from the input database. A logical table can be one of the following:
- A base table,
- a view, or
- a valid SQL query (called an “R2RML view” because it emulates a SQL view without modifying the database).
Each logical table is mapped to RDF using a triples map. The triples map is a rule that maps each row in the logical table to a number of RDF triples.
The rule has two main parts:
- A subject map that generates the subject of all RDF triples that will be generated from a logical table row. The subjects often are IRIs that are generated from the primary key column(s) of the table.
- Multiple predicate-object maps that in turn consist of predicate maps and object maps (or referencing object maps).
Triples are produced by combining the subject map with a predicate map and object map, and applying these three to each logical table row.