5

I've tried to figure out what's differences between the two rdb2rdf mapping languages Direct Mapping and R2RML are.

I understand that booth languages generate RDF files that stand for a virtual RDF graph - which can be accessed via SPARQL.

So what's the point in having two W3C languages/standards doing the same!?

MT0
  • 143,790
  • 11
  • 59
  • 117
Kody
  • 1,154
  • 3
  • 14
  • 31

2 Answers2

7

The two standards don't do the same.

Direct Mapping is a default, convention-based algorithm to convert relational data into RDF graphs. It defines how tables, primary keys, relationships, etc. are converted.

On the other hand R2RML is a language, with which you can create your own mappings, including Direct Mapping. As examples it gives you various ways to construct URLs, map tables to RDF classes or map custom SQL SELECT statements instead of tables.

R2RML defines a relaxed variant of the Direct Mapping intended as a default mapping for further customization.

So, R2RML actually includes a definition of Direct Mapping. Implementing tools can generate mappings from existing database, which can be further adjusted.

Tomasz Pluskiewicz
  • 3,622
  • 1
  • 19
  • 42
1

RDB to RDF mapping tools like D2RQ and SPIDER use a language to provide online mapping from a relational database to RDF, which means data are converted to RDF on the fly. Data can be converted directly without any user customization or users should specify the columns and the mapping predicates accordingly. The former is called directed mapping which is usually used for simple RDB databases, but for a relational database with complex structure, R2RML language is used for mapping.

Enayat
  • 3,904
  • 1
  • 33
  • 47