<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Barcelona, Spain
$ ali.elhalawati@kuleuven.be (A. Elhalawati);
anastasia.dimou@kuleuven.be (A. Dimou); olaf.hartig@liu.se
(O. Hartig); daniel.hernandez@ki.uni-stuttgart.de
(D. Hernández)</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Flexible RML-Based Mapping of Property Graphs to RDF</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ali Elhalawati</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anastasia Dimou</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Olaf Hartig</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniel Hernández</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>KU Leuven</institution>
          ,
          <addr-line>Leuven</addr-line>
          ,
          <country country="BE">Belgium</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Linköping University</institution>
          ,
          <addr-line>Linköping</addr-line>
          ,
          <country country="SE">Sweden</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Person name: Roger Federer</institution>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>University of Stuttgart</institution>
          ,
          <addr-line>Stuttgart</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0003</lpage>
      <abstract>
        <p>RDF graphs and (Labeled) Property Graphs (PGs) have emerged as data models for representing graph databases. Given the diferences between the two models, ensuring interoperability between them has become essential, to leverage the strengths of both models. Various approaches have been proposed to map PGs to RDF graphs. However, these approaches difer in terms of structure, representation, size of the generated RDF graph, and degree of configuration provided to the user, making direct comparisons challenging. While declarative methods prevailed to construct RDF graphs from other data formats, the mapping languages proposed for such transformations have not been considered so far for mapping PGs to RDF graphs. In this work, we provide a representation of PG-to-RDF approaches through templates described using RML, a mapping language to construct RDF graphs from heterogeneous data. We show that all considered PG-to-RDF approaches can be represented in RML and, by having a uniform representation of them, we can compare them showcasing their diferences. Finally, we show that not only can RML be used to capture PG-to-RDF mappings, but it actually ofers more expressive power than the considered PG-to-RDF approaches.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>plays
since: 1998</p>
      <p>Sport
name: Tennis
Roger Federer ex:name n1:Person ex:plays n2:Sport ex:name Tennis</p>
    </sec>
    <sec id="sec-2">
      <title>1. Introduction</title>
      <p>
        Graph databases are powerful representation methods
to model data with relationships and dependencies
across various fields [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ]. In graph databases, nodes
normally represent entities, while edges capture their
relationships. The most prominent and widely adopted
forms of graph databases today are Property Graphs
(PGs) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and RDF Graphs [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        Assuming the reader’s familiarity with the concepts
and terminologies of PGs and RDF graphs [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], Fig. 1
shows a PG with two nodes, labeled “Person” and
“Sport”, an edge with the label “plays”, node
properties as name: “Roger Federer”, and an edge property
since: “1998”. Fig. 2 illustrates an RDF graph with
triples having two subjects n1:Person and n2:Sport,
Predicates as ex:plays and ex:name, and objects as
n2:Sport and “Tennis”.
      </p>
      <p>
        RDF-star [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is an extension of RDF where the
subject and the object can be triples, i.e. an RDF
triple can be treated as a node within the graph. For
example, the triple n1:Person ex:plays n2:Sport in
Fig. 2 can be the subject to the triple «n1:Person
ex:plays n2:Sport» ex:since “1998”.
      </p>
      <p>
        PGs and RDF graphs have representational and
structural diferences [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. RDF graphs do not have
edges, properties, or labels, and are not multigraphs
as PGs. On the other hand, RDF graphs rely on IRIs
to have global unique identifiers for RDF components,
unlike PGs that rely on IDs to uniquely identify PG
components only inside the scope of the PG.
      </p>
      <p>
        Since PGs and RDF graphs difer, the choice
between them depends on the use case. However, to
leverage the strengths of both, several approaches have
been proposed to enable their interoperability.
Several works exist in the literature on RDF-to-PG
mapping [
        <xref ref-type="bibr" rid="ref7 ref8 ref9">7, 8, 9</xref>
        ], as well as PG-to-RDF mapping [
        <xref ref-type="bibr" rid="ref10 ref11 ref12 ref13 ref14 ref15 ref16">10, 11,
12, 13, 14, 15, 16</xref>
        ]. Some of the PG-to-RDF approaches
provide direct mappings to convert PGs to RDF
automatically without user intervention [
        <xref ref-type="bibr" rid="ref10 ref11 ref12">10, 11, 12</xref>
        ], while
other approaches ofer configuration on the RDF terms
in the output RDF graph [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], or even generate an
RDF graph for a specific PG sub-graph [
        <xref ref-type="bibr" rid="ref14 ref15">14, 15</xref>
        ].
      </p>
      <p>Despite the existence of several PG-to-RDF
mapping approaches, it is hard to compare them directly,
since each approach difers in terms of the structure,
representation, size of the generated RDF graph, the
degree of configuration provided to the user, and
assumes diferent data formats for the input PG. In
addition, these approaches impose restrictions on the
generated RDF terms in their mappings. For example,
all the PG-to-RDF approaches do not allow combining
more than one PG component in one RDF term in the
generated RDF graph, and restrict property values in
a PG to be literals in the generated RDF graph.</p>
      <p>
        Several declarative mapping languages were
proposed to construct RDF graphs from heterogeneous
data sources [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. However, these mapping languages
are not considered so far for mapping PGs to RDF
graphs. The RDF Mapping Language (RML) is a
declarative mapping language used to generate RDF
graphs from heterogeneous data sources [
        <xref ref-type="bibr" rid="ref18 ref19">18, 19</xref>
        ], by
extending the W3C recommended R2RML [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] to
heterogeneous data sources. RML has been extended
to RML-star [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], enabling declarative mappings to
generate RDF-star graphs.
      </p>
      <p>In this work, we provide a uniform method for
comparing the existing PG-to-RDF approaches using RML
and show that RML can map PGs to RDF graphs.
We accomplish this by representing each considered
PG-to-RDF mapping approach as a template of RML
mappings and providing a uniform input format for
the PG across all considered approaches. These RML
templates require the user to define only the property
keys and values to be mapped from the PG. This
uniform representation of the most prominent PG-to-RDF
mapping approaches enables direct comparisons,
highlighting their diferences. In addition, we highlight the
limitations of the considered PG-to-RDF approaches
in generating RDF graphs and showcase that not only
RML supports mapping PG-to-RDF, but it also
offers more expressive power and configuration than the
considered PG-to-RDF approaches.</p>
    </sec>
    <sec id="sec-3">
      <title>2. Preliminaries</title>
      <p>
        In this section, we revisit the formal definition of
PGs and briefly summarize RML. We refrain from
formally defining RDF graphs as it is unnecessary for
this work and instead, refer to the RDF specification
for details [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. We adopt the formal definition of PGs
from [
        <xref ref-type="bibr" rid="ref12 ref4 ref6">6, 12, 4</xref>
        ], as follows.
      </p>
      <p>Definition 1.</p>
      <p>A PG is the tuple (, , , , 
that</p>
      <p>is a finite set of nodes and
of edges where 
∩ 
= ∅</p>
      <p>.  : 
edge construction total function.  : (
total function that maps nodes and edges to labels in
 .  : (
∪  ) ×</p>
      <p>→ 
takes a node/edge and a property from 
and assigns
them to a property value from 
.
is a partial function that</p>
      <p>) such

→ (
is a finite set</p>
      <p>×  ) is the
∪  ) →  is a
Example 1. The formal definition of PGs captures the
PG in Fig. 1 as follows:
 = { 1,  2},  ( 1) = “Person”,  ( 2) = “Sport”,
 = { 1},  ( 1) = “plays”,  ( 1) = ( 1,  2),
 ( 1,</p>
      <p>) = “Roger Federer”,
 ( 2, 
) = “Tennis”,  ( 1,</p>
      <p>) = “1998”
describes how to</p>
      <p>An RML Mapping Document ℳ
generate RDF graphs from input data sources. ℳ
formed from a set of Triples Maps that define how to
is
generate triples in an RDF graph. A triples map has
zero or one Logical Source, one Subject Map, zero or
more Predicate-Object Maps, and zero or more Graph
Maps.</p>
      <p>The logical source specifies the input data
source. The subject map defines how to create
subjects in triples. A predicate-object map consists of one
or more Predicate Map that defines the rule generating
the predicates in RDF triples. Additionally, a
predicate map is accompanied by one or more Object Map
that defines how to generate objects in triples. Graph
maps can be specified in subject maps and object maps
to group the generated triples in named graphs.</p>
      <p>
        To support the extension of RDF with RDF-star,
Delva et al. introduce an extension of RML,
RMLStar [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], which enables the generation of RDF-star
triples. An RML-Star ℳ
may include Triples Maps,
Asserted Triples Maps, and Non-Asserted Triples Maps.
The RDF triples constructed by the asserted triples
maps are also generated in the output graph, unlike
the non-asserted triples maps where the constructed
RDF triples are only referenced inside RDF-star triples.
Asserted and non-asserted triples maps contain Star
Maps for subject and object maps. Each Star Map has
a Quoted Triples Map referencing another asserted or
non-asserted triples map.
      </p>
    </sec>
    <sec id="sec-4">
      <title>3. RML Templates for PG-to-RDF</title>
      <p>
        Several works map PGs to RDF graphs, we review
these works and provide their corresponding RML
templated mappings necessary for generating RDF
graphs on a running example. These templated
mappings only require the user to specify the property keys
and values to be mapped from their PG. In our work,
Neo4j serves as the database system for managing PGs.
Neo4j enables users to query the stored PGs using the
Cypher query language. The query results are then
exported to a JSON using the APOC [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] plugin in
Neo4j. We present the templated RML mappings in
a YARRRML serialization [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ]. The full YARRRML
and RML templates of each considered approach are
available in a dedicated GitHub repo (https://github.
com/dtai-kg/PG-to-RDF-RML-Templates).
      </p>
      <sec id="sec-4-1">
        <title>3.1. The Oracle Approaches</title>
        <p>
          Das et al. [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] introduced three PG-to-RDF direct
mappings for Oracle databases, which difer in the mapping
of edge properties: reification-based (RF),
subproperty-based (SP), and named graph-based (NG). None of
them covers node labels. Predefined transformation
functions IRI and Literal, are used to transfer PG
elements to IRIs and literals in the output RDF graph.
        </p>
        <sec id="sec-4-1-1">
          <title>RF Mapping</title>
          <p>IRI( ) IRI( ) Literal( ).</p>
          <p>Example 2. Applying the RF mapping to the PG in
generate the RDF graph in Ex. 2 are the following:
Listing 1: The RF Template Mappings
TM1 : 1
s: pg:e$(id) 2
po: 3
- [ rdf : predicate , pg:r/$( label )] 4
- [ rdf : subject , pg:n$( start .id)] 5
- [ rdf : object , pg:n$( end .id)] 6
- [pg:k/ since , $( properties . since )] 7
TM2 : 8
s: pg:n$( start .id) 9
po: 10
- [pg:r/$( label ), pg:n$( end .id)] 11
- [pg:k/name , $( start . properties . name )] 12
TM3 : 13
s: pg:n$( end .id) 14
po: 15
- [pg:k/name , $( end . properties . name )] 16
TM1 generates the triples where the edge is the subject,
while TM2 and TM3 generate the triples where the
source node and the target node are subjects.
SP Mapping For   = (, , , ,  ), the
corresponding RDF graph is generated such that for every
 ∈  where  ( ) = ( 1,  2) and  ( ) =  triples are
generated as follows:
IRI( ) rdfs : subPropertyOf IRI( ).</p>
          <p>IRI( 1) IRI( ) IRI( 2).</p>
          <p>IRI( 1) IRI( ) IRI( 2).</p>
          <p>For  ∈  ∪  with  (,  ) =  , the triples are
generated following step 2 in RF mapping.</p>
          <p>Example 3. On the PG of Fig. 1, SP maps edges and
their labels as follows:
pg:e1 rdfs : subPropertyOf pg:r/ plays .
pg:n1 pg:e1 pg:n2.</p>
          <p>SP overlaps with the RF in the generated RDF graph
for the nodes and properties. However, they difer
in the RDF graph for the edges and their labels by
relying on the subPropertyOf relationship to express
the edges instead of reification. This requires slight
modifications to the template in Listing 1, the modified
template is available in our dedicated GitHub repo.
NG Mapping For   = (, , , ,  ), an RDF
graph is generated following the NG mapping as
follows: (i) For every  ∈  where  ( ) = ( 1,  2)
and  ( ) =  a triple is generated and grouped in
a named graph following the construction IRI( 1)
IRI( ) IRI( 2) IRI( ), (ii) for every  (,  ) =  , we
group the edge properties in named graphs following
the construction IRI( ) IRI( ) Literal( ) IRI( ),
(iii) for every  ∈  , the triples are generated as step
2 in RF mapping.</p>
          <p>Example 4. On the PG of Fig. 1, the NG mapping
groups edges, labels, and properties in named graphs:
pg:n1 pg:r/ plays pg:n2 pg:e1.
pg:e1 pg:k/ since “1998” pg:e1.</p>
          <p>
            NG mapping is similar to RF and SP in generating
RDF graphs for PG nodes and node properties.
However, it difers in generating RDF graphs for edges,
edge properties, and edge labels. Slight modifications
are required for the template in Listing 1, where edge
relations, properties, and labels are placed in named
graphs categorized by the edges.
Nguyen et al. [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ] propose a direct PG-to-RDF
mapping through an intermediate unified graph model
called Singleton Property Graph (SPG). SPGs capture
the structures of both PGs and RDF graphs. To
transform PGs into SPGs, each node and edge in the PG is
mapped to a node in the SPG. Furthermore, two edges
are introduced in the SPG: one connects the edge’s
created node to the source node, and the other links
the edge’s node to the destination node. The same
non-configurable transformation functions IRI and
Literal defined in the Oracle approaches are assumed.
Also, three unique IRIs IRI , IRI , IRI are
used to describe the edge relation and node/edge
labels in the output RDF graph. The PG is mapped
to an SPG, which is mapped to an RDF graph as
follows: Let   = (, , , ,  ) be a PG, for every
 ∈  and  ( ) =  a triple is generated following
the construction IRI( ) IRI Literal( ). For
every  ∈  with  ( ) = ( 1,  2) and  ( ) =  triples
are generated as follows:
IRI( 1) IRI
IRI( ) IRI
IRI( ) IRI
          </p>
          <p>IRI( ).</p>
          <p>IRI( 2).</p>
          <p>Literal( ).</p>
          <p>For  ∈  ∪  , the triples are generated as step 2 in
RF mapping.</p>
          <p>Example 5. Applying the SPG mapping to the PG in
Fig. 1 yields an RDF graph as follows:
ex:n1 rdfs : label “Person”.
ex:n1 ex: name “Roger Federer”.
ex:n2 rdfs : label “Sport”.
ex:n2 ex: name “Tennis”.
ex:e1 rdfs : label “plays”.
ex:e1 ex: since “1998”.
ex:n1 ex: nodeToedge ex:e1.
ex:e1 ex: EdgeTonode ex:e2.</p>
          <p>
            SPG does not diferentiate between edge and node
labels. To address this, a variation of the SPG mapping
was proposed [
            <xref ref-type="bibr" rid="ref6">6</xref>
            ], where the unique IRI IRI is split
into two distinct IRIs IRI and IRI for edge
and node labels respectively.
          </p>
          <p>We showcase the template RML mappings by
generating the RDF graph in Ex. 5 as follows:</p>
          <p>Listing 2: The SPG Template Mappings
TM1 :
s: ex:n$(id)
po:
- [ rdfs : label , $( labels )]
- [ex:name , $( properties . name )]
TM2 :
s: ex:n$( start .id)
po:</p>
          <p>- [ex: nodeToedge , ex:e$(id)]
TM3 :
s: ex:e$(id)
po:
- [ rdfs : label , $( label )]
- [ex: edgeTonode , ex:n$( end .id)]
- [ex: since , $( properties . since )]
TM1 generates RDF triples that describe the
properties of nodes in the graph. TM2 generates triples
that link the source node to the edge. TM3 generates
triples that describe the edge’s properties and label
and connect the edge to the target node.</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>3.3. RDF-Star-Based Approach</title>
        <p>
          Hartig [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] proposes an RDF-star-based mapping
approach that converts PGs to RDF-star graphs by
describing edge properties using RDF-star triples, where
the triple connecting the edge label to the source
node and the target node is used as the subject in
these RDF-star triples. This approach enables users
to choose patterns for generating IRIs that denote
edge labels and property keys, and the desired RDF
term in the resulting RDF-star graph for certain PG
components.
        </p>
        <p>The functions IRI, Literal, 
and 
take a PG component</p>
        <p>and transfer it to an RDF
term such that IRI( ) and Literal( ) generate an
IRI and a literal.  ( ) generates either a literal or an
IRI, and  ( ) generates a blank node or an IRI. The
functions IRI,  , and  are configurable , i.e. the user
can define the IRIs to be used, as well as the desired
RDF term in  and  . In addition, an IRI IRI
used to describe the presence of a node label.
is
SPG approach in producing node labels and properties.
The diference lies in expressing the edge relations,
labels, and properties using RDF-star. The mappings
in Listing 2 are modified with RML-star mappings to
generate the desired triples. We provide this modified
template in our GitHub repo.</p>
      </sec>
      <sec id="sec-4-3">
        <title>3.4. PGO Approach</title>
        <p>
          Tomaszuk et al. proposed the Property Graph
Ontology (PGO), an OWL ontology designed for describing
PGs in RDF [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. Users are restricted to using the
predefined ontology terms provided by PGO and can
only integrate these terms with a limited set of other
ontologies specified in [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. The same non-configurable
transformation functions IRI and Literal described
in the oracle approach are used to convert a PG
component to an IRI or literal.
where  ( ) = ( 1,  2), triples are generated as follows:
∈ 
∈ 
IRI( ) rdf : type pgo : Edge .
        </p>
        <p>IRI( ) pgo : startNode IRI( 1).</p>
        <p>IRI( ) pgo : endtNode IRI( 2).</p>
        <p>For each  ∈</p>
        <p>with  (,  ) =  a triple is generated
following the construction IRI( ) pgo:hasEdgeProperty
IRI( ,,
). For  ∈</p>
        <p>∪ 
following triples are generated:
IRI( ,, ) rdf : type pgo : Property .</p>
        <p>IRI( ,,</p>
        <p>) pgo : key Literal( ).</p>
        <p>IRI( ,, ) pgo : value Literal( ).
such that  (,  ) =  the
For 
∈</p>
        <p>∪ 
pgo:label Literal( ) is generated.</p>
        <p>where  ( ) =  , the triple IRI( )
Example 7. We show a sample of the PGO mapping
on the PG in Fig. 1:
ex:n1 rdf : type pgo : Node .
ex:n1 pgo : label “Person”.
ex:n1 pgo : hasNodeProperty ex:p1.
ex:n2 rdf : type pgo : Node .
ex:p1 rdf : type</p>
        <p>pgo : Property .
ex:p1 pgo : key “name”.
ex:p1 pgo : value “Roger Federer”.
ex:e1 rdf : type pgo : Edge .
ex:e1 pgo : startNode ex:n1.
ex:e1 pgo : endNode ex:n2.
ex:e1 pgo : label “plays”.
ex:e1 pgo : hasEdgeProperty ex:p2.
ex:p2 rdf : type</p>
        <p>pgo : Property .
ex:p2 pgo : key “since”.
ex:p2 pgo : value “1998”.
1
2
3
4
5
8
9
10
11
12
13
14
15
16
17
19
20
21
22
23
24
25
Besides relying on specific ontology terms, the PGO
translation generates a large RDF graph even for a
small PG, as repeated triples are generated for PG
components to comply with the ontology. To adapt
to the assumption of having unique property IDs, we
attach the property value to the node/edge and use
it as a unique ID for each property. In addition, to
correctly construct triples specialized to nodes/edges,
we use functions in RML to check the type of the PG
component. The template RML mappings to generate
the RDF graph in Ex. 7 are as follows.</p>
        <p>Listing 3: The PGO Template Mappings
TM1 :
s: ex:n$(id)
condition :
function : idlab -fn: equal
parameters :
- [ grel : valueParameter , $( type ), s] 6
- [ grel : valueParameter2 , " node ", o] 7
po:
- [a, pgo : Node ]
- [ pgo : label , $( labels )]
- [ pgo : hasNodeProperty ,</p>
        <p>ex:p_$( properties . name )_$(id)]
TM2 :
s: ex:e$(id)
condition :
function : idlab -fn: equal
parameters :
- [ grel : valueParameter , $( type ), s] 18
- [ grel : valueParameter2 ,</p>
        <p>" relationship ", o]
po:
- [a, pgo : Edge ]
- [ pgo : hasEdgeProperty ,</p>
        <p>ex:p_$( properties . since )_$(id)]
TM3 :
s: ex:p_$( properties . name )_$(id)
po :
TM4 :
po :
TM5 :
- [a , pgo : property ]
- [ pgo : key , " name "]
- [ pgo : value , $( properties . name )]
s: ex : p_$( properties . since )_$( id )
- [a , pgo : property ]
- [ pgo : key , " since "]
- [ pgo : value , $( properties . since )]
s: ex :e$( id )
po :
- [ pgo : startNode , ex :n$( start . id )]
- [ pgo : endNode , ex :n$( end . id )]
- [ pgo : label , $( label )]
TM1 generates the triples that identify the node,
attach the node to its label, and create the unique
properties IDs for each node. TM2 does the same as TM1
but for edges. TM3 and 4 construct the triples to
describe the node/edge properties. TM5 generates the
triples that describe the edge label, and connect the
edge to its source and target nodes.</p>
      </sec>
      <sec id="sec-4-4">
        <title>3.5. PRSC and PREC Approaches</title>
        <p>
          Bruyat [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ] introduces two user-defined mappings that
convert PGs to RDF PRSC [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] and PREC [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
        </p>
        <p>
          PRSC [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] is defined as mapping rules written in
RDF-star [
          <xref ref-type="bibr" rid="ref25">25</xref>
          ]. PRSC mapping rules are divided into
target and production parts.
        </p>
        <p>The target specifies
the intended component in the PG based on its type
(node or edge), label, and property names. The labels
and property names of the target node/edge must be
specified since omitting them implies that they do not
exist in the original PG. In the production part of
the rule, the user specifies the desired output in the
RDF-star graph. Let  
• pvar:self represents  ∈  or  ∈  in the
• pvar:source represents the source node  1 of
any edge  with  ( ) = ( 1,  2) as a blank node.
• pvar:destination represents the target node
 2 for any edge  with  ( ) = ( 1,  2) in the
form of a blank node.
• prec:valueOf(p) is a literal representing the
value  for  (,  ) =  where  ∈  ∪  ,  has
In the production part of every rule, users can combine
these variables with any desired constant IRI to define
the intended output in the RDF-star graph.
Example 8. Applying this PRSC rule on the PG in
tends to target a specific node or edge  , they are
required to specify all the property names and labels
of  , even if these are not intended to be included
in the production part of the rule. This requirement
can be tedious, particularly for property graphs with
numerous properties and labels.</p>
        <p>
          PREC [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] follows the same structure as PRSC
but introduces some diferences. In the target part of
PREC rules, the target can be a property instead of
only a node/edge. Moreover, unlike PRSC, omitting
certain property names of the target node or edge does
not imply their non-existence. PREC is deemed in [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ]
as a low-level mapping that is “not user-friendly" and
“dificult" as it requires the user to be very familiar
with the language and learn an extensive vocabulary
to utilize it efectively. Another limitation of PREC is
that it sometimes produces unexpected triples
specifically in cases where diefrent nodes/edges share the
same property names. In addition, PREC cannot deal
with nodes/edges having empty labels.
        </p>
        <p>
          Despite the high degree of configuration, PREC and
PRSC share some limitations. Both systems convert
the entire PG to an RDF graph following the PGO
ontology [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ], this proved some scalability issues as
mentioned in [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. Both systems enforce certain RDF
term types for each PG component, e.g., nodes/edges
are always blanks and property values are always
literals. Property values are enforced to be used only as
objects in the output RDF graph, and it is impossible
to combine diferent PG components in one RDF term.
{


then 
:
:, 
∈ {
:
:
( )}.
        </p>
        <sec id="sec-4-4-1">
          <title>PRSC Solution</title>
          <p>Let  PRSC be a set of mappings in
PRSC format, every mapping rule  in  PRSC has
a target t and a production prod.
t has a type
node or edge, a possible-empty label  , and a
possibleempty set of property names  . prod represents an
RDF-star graph where every triple in prod can
contain user-defined constant IRIs, another triple, or a
PRSC-defined variable  . For every  in  PRSC, if
t has a type node, then for any 
∈ prod, 
name in the PG. Otherwise, if t has a type edge,
( )} where  is a property
, 
:
, 
:
∈
For every  in   
, let  ( ) → 
be a function
that constructs a cypher query 
for  in  . We show
how to construct</p>
          <p>based on the content of  as follows:
• if  has type node, a non-empty label  , and
 = { 1,  2, . . .   } where  ≥ 0:
MATCH (n: ) WHERE n. 1 IS NOT NULL AND
n. 2 IS NOT</p>
          <p>NULL . . . AND
n.</p>
          <p>IS NOT</p>
          <p>NULL AND size ( keys (n)) =  RETURN
(n)
• if  has type node, an empty label, and  =
{ 1,  2, . . .   } where  ≥ 0:
MATCH (n) WHERE size ( labels (n)) = 0 AND
n. 1 IS NOT NULL AND n. 2 IS NOT
NULL . . . AND n.</p>
          <p>IS NOT</p>
          <p>NULL AND
size ( keys (n)) =  RETURN (n)
• if  has type edge, a non-empty label  , and
 = { 1,  2, . . .   } where  ≥ 0:
MATCH (n) -[r: ] - &gt;( q) WHERE n. 1 IS NOT</p>
          <p>SPG
star</p>
        </sec>
      </sec>
      <sec id="sec-4-5">
        <title>3.7. RML as a Flexible Solution</title>
        <p>Besides covering all the PG-to-RDF translations
considered, RML overcomes all their limitations by
providing full control over the RDF terms, the desired
output (RDF or RDF star), and the ability to combine
multiple components from the input data. We
showcase in Listing 4 RML-star mappings that generate a
custom RDF graph for portions of the PG in Fig. 1.
This RDF graph is impossible to generate with any of
the considered PG-to-RDF approaches and shows the
great mapping flexibility of RML. The full version of
the Listing is provided in the dedicated GitHub repo.</p>
        <p>Listing 4: Highly Flexible RML Mappings
TM1 :
TM2 :
po :
po :
TM3 :
s: ex :$( labels )/$( properties . name )
- [ ex : nodeID , $( id )]
s: ex :$( start . properties . name )
- [ ex :$( label ) ,
s: ex : since
po :
- p: ex :$( properties . since )
o:
- quoted : TM2
$( end . properties . name )]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Applying the RML mappings in Listing 4 on the PG
in Fig. 1 results in the following RDF-star graph:
&lt;ex : Person / Roger %20 Federer &gt; ex : nodeID “1”.
&lt;ex : Sport / Tennis &gt; ex : nodeID
“2”.
&lt;ex : Roger %20 Federer &gt; ex : plays “Tennis”.
ex : since ex :1998 &lt;&lt; ex : Roger %20 Federer ex :
plays “Tennis”&gt;&gt;.</p>
        <p>This RDF graph generated from Listing 4 shows that
RML can flexibly map PG components to RDF. TM1
generates the first and second triples, where the object
is the node, and the subject is an IRI combining the
property value and label. Such triples are not
achievable by any of the considered PG-to-RDF approaches,
as they force the property value to be an object literal.
They also restrict PG nodes to be IRIs or blank nodes
and do not allow mapping multiple PG components
as a single IRI. TM2 generates the third triple, which
is used as an object in TM3 to generate the fourth
RDF-star triple. None of the considered approaches
allows using triples in the object of an RDF-star triple.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>4. Conclusions</title>
      <p>In this work, we presented RML as a uniform and
flexible solution for mapping PGs to RDF. We studied the
most prominent PG-to-RDF translations and provided
templated RML mappings that show RML’s
capability in performing these translations. For future work,
we plan to conduct a thorough performance
comparison between the considered PG-to-RDF approaches
in generating RDF graphs with RML.</p>
      <sec id="sec-5-1">
        <title>Acknowledgments</title>
        <p>Hartig’s contributions to this work were funded by
Vetenskapsrådet (the Swedish Research Council, project
reg. no. 2019-05655). Dimou and Elhalawati’s
contributions to this research were partially supported by
Flanders Make, the strategic research centre for the
manufacturing industry, and the Flemish Government
under the “Onderzoeksprogramma Artificiële
Intelligentie (AI) Vlaanderen” program. Hernández’s
contributions to the work were funded by the German
Research Foundation, DFG (GA SFB-1574-471687386).</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Tian</surname>
          </string-name>
          , Yuanyuan,
          <source>The World of Graph Databases from An Industry Perspective, SIGMOD Rec</source>
          .
          <volume>51</volume>
          (
          <year>2022</year>
          ). doi:
          <volume>10</volume>
          .1145/3582302.3582320.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Robinson</surname>
          </string-name>
          , Ian and Webber, Jim and Eifrem, Emil, Graph Databases:
          <article-title>New Opportunities for Connected Data</article-title>
          , 2nd ed.,
          <string-name>
            <surname>O'Reilly Media</surname>
          </string-name>
          , Inc.,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wood</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lanthaler</surname>
          </string-name>
          ,
          <source>RDF 1.1 Concepts</source>
          and
          <string-name>
            <given-names>Abstract</given-names>
            <surname>Syntax</surname>
          </string-name>
          , Recommendation,
          <source>World Wide Web Consortium (W3C)</source>
          ,
          <year>2014</year>
          . URL: http://www.w3.org/TR/rdf11-concepts/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Angles</surname>
          </string-name>
          ,
          <article-title>Renzo and Arenas, Marcelo and Barceló, Pablo and Hogan, Aidan and Reutter, Juan and Vrgoč, Domagoj, Foundations of Modern Query Languages for Graph Databases</article-title>
          ,
          <source>ACM Comput. Surv</source>
          .
          <volume>50</volume>
          (
          <year>2017</year>
          ). doi:
          <volume>10</volume>
          .1145/3104031.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Hartig</surname>
          </string-name>
          ,
          <article-title>Olaf and Champin, Pierre-Antoine and Kellogg, Gregg and Seaborne, Andy, RDFstar and SPARQL-star</article-title>
          ,
          <source>W3C Final Community Group Report</source>
          ,
          <year>2021</year>
          . URL: https://w3c.github. io/rdf-star/cg-spec/2021-12-17.html.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Khayatbashi</surname>
          </string-name>
          ,
          <article-title>Shahrzad and Ferrada, Sebastián and Hartig, Olaf, Converting property graphs to RDF: a preliminary study of the practical impact of diferent mappings</article-title>
          ,
          <source>in: Proceedings of the 5th ACM SIGMOD Joint International Workshop on Graph Data Management Experiences &amp; Systems (GRADES)</source>
          and
          <article-title>Network Data Analytics (NDA)</article-title>
          , ACM,
          <year>2022</year>
          . doi:
          <volume>10</volume>
          .1145/3534540.3534695.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>R.</given-names>
            <surname>Angles</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Thakkar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Tomaszuk</surname>
          </string-name>
          , Mapping RDF Databases to Property Graph Databases,
          <source>IEEE Access 8</source>
          (
          <year>2020</year>
          ). doi:
          <volume>10</volume>
          .1109/ACCESS.
          <year>2020</year>
          .
          <volume>2993117</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>D.</given-names>
            <surname>Tomaszuk</surname>
          </string-name>
          ,
          <article-title>RDF Data in Property Graph Model</article-title>
          ,
          <source>in: Metadata and Semantics Research</source>
          , Springer International Publishing,
          <year>2016</year>
          . doi:
          <volume>10</volume>
          . 1007/978-3-
          <fpage>319</fpage>
          -49157-
          <issue>8</issue>
          _
          <fpage>9</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>G.</given-names>
            <surname>Abuoda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Dell'Aglio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Keen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Hose</surname>
          </string-name>
          ,
          <article-title>Transforming rdf-star to property graphs: A preliminary analysis of transformation approaches</article-title>
          ,
          <source>in: Proceedings of the QuWeDa</source>
          <year>2022</year>
          : 6th Workshop on Storing,
          <article-title>Querying and Benchmarking Knowledge Graphs co-located with ISWC, CEUR-WS</article-title>
          .org,
          <year>2022</year>
          . URL: https://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>3279</volume>
          /paper2.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Das</surname>
          </string-name>
          ,
          <article-title>Souripriya and Srinivasan, Jagannathan and Perry, Matthew and Chong, Eugene Inseok and Banerjee, Jayanta, A Tale of Two Graphs: Property Graphs as RDF in Oracle</article-title>
          .,
          <source>in: Proceedings of the 17th International Conference on Extending Database Technology</source>
          ,
          <string-name>
            <surname>EDBT</surname>
          </string-name>
          , OpenProceedings.org,
          <year>2014</year>
          . doi:
          <volume>10</volume>
          .5441/002/edbt.
          <year>2014</year>
          .
          <volume>82</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <article-title>Vinh and Yip, Hong Yung and Thakkar, Harsh and Li, Qingliang and Bolton, Evan</article-title>
          and Bodenreider, Olivier, Singleton Property Graph:
          <article-title>Adding A Semantic Web Abstraction Layer to Graph Databases</article-title>
          .,
          <source>in: Proceedings of the Blockchain enabled Semantic Web Workshop</source>
          (BlockSW) and
          <article-title>Contextualized Knowledge Graphs (CKG) Workshop co-located with ISWC, CEUR-WS</article-title>
          .org,
          <year>2019</year>
          . URL: https://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2599</volume>
          /CKG2019_paper_4.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Tomaszuk</surname>
            , Dominik and Angles, Renzo and Thakkar, Harsh,
            <given-names>PGO</given-names>
          </string-name>
          : Describing Property Graphs in
          <string-name>
            <surname>RDF</surname>
          </string-name>
          , IEEE Access 8
          <article-title>(</article-title>
          <year>2020</year>
          ). doi:
          <volume>10</volume>
          . 1109/ACCESS.
          <year>2020</year>
          .
          <volume>3002018</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Hartig</surname>
          </string-name>
          , Olaf,
          <article-title>Foundations to Query Labeled Property Graphs using SPARQL</article-title>
          ,
          <source>in: Joint Proceedings of the 1st International Workshop On Semantics For Transport and the 1st International Workshop on Approaches for Making Data Interoperable co-located with SEMANTiCS</source>
          ,
          <source>CEUR-WS.org</source>
          ,
          <year>2019</year>
          . URL: https://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2447</volume>
          /paper3.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Bruyat</surname>
          </string-name>
          ,
          <article-title>Julian and Champin, Pierre-Antoine and Médini, Lionel and Laforest, Frederique, PREC: semantic translation of property graphs</article-title>
          ,
          <source>in: 1st workshop on Squaring the Circles on Graphs, SEMANTiCS</source>
          ,
          <year>2021</year>
          . URL: https://hal.science/ hal-03407785v1.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>Bruyat</surname>
          </string-name>
          ,
          <article-title>Julian and Champin, Pierre-Antoine and Médini, Lionel and Laforest, Frederique, PRSC: From PG to RDF and back, using schemas, Semantic Web (</article-title>
          <year>2024</year>
          ). doi:
          <volume>10</volume>
          .3233/SW-243675.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <surname>NeoSemantics</surname>
          </string-name>
          , Accessed:
          <fpage>2025</fpage>
          -01-
          <lpage>06</lpage>
          . URL: https: //github.com/neo4j-labs/neosemantics.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>D. Van Assche</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Delva</surname>
            , G. Haesendonck,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Heyvaert</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>De Meester</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Dimou</surname>
          </string-name>
          ,
          <article-title>Declarative RDF graph generation from heterogeneous (semi)structured data: A systematic literature review</article-title>
          ,
          <source>Journal of Web Semantics</source>
          (
          <year>2023</year>
          ). doi:https: //doi.org/10.1016/j.websem.
          <year>2022</year>
          .
          <volume>100753</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>A.</given-names>
            <surname>Dimou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. Vander</given-names>
            <surname>Sande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Colpaert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Verborgh</surname>
          </string-name>
          , E. Mannens, R. Van de Walle,
          <article-title>RML: A Generic Language for Integrated RDF Mappings of Heterogeneous Data</article-title>
          ,
          <source>in: Proceedings of the 7th Workshop on Linked Data on the Web, CEUR</source>
          ,
          <year>2014</year>
          . URL: http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>1184</volume>
          / ldow2014_paper_01.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>A.</given-names>
            <surname>Iglesias-Molina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. Van Assche</given-names>
            ,
            <surname>J. ArenasGuerrero</surname>
          </string-name>
          , B. De Meester,
          <string-name>
            <given-names>C.</given-names>
            <surname>Debruyne</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Jozashoori</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Maria</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Michel</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          <article-title>ChavesFraga, A. Dimou, The RML Ontology: A Community-Driven Modular Redesign After a Decade of Experience in Mapping Heterogeneous Data to RDF</article-title>
          , in: International Semantic Web Conference, Springer,
          <year>2023</year>
          . doi:
          <volume>10</volume>
          .1007/ 978-3-
          <fpage>031</fpage>
          -47243-
          <issue>5</issue>
          _
          <fpage>9</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>S.</given-names>
            <surname>Das</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Sundara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          ,
          <article-title>R2RML: RDB to RDF Mapping Language</article-title>
          , Working Group Recommendation,
          <year>2012</year>
          . URL: http://www.w3.org/ TR/r2rml/.
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>T.</given-names>
            <surname>Delva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Arenas-Guerrero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Iglesias-Molina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Corcho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Chaves-Fraga</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Dimou,
          <article-title>RMLstar: A declarative mapping language for RDFstar generation</article-title>
          ,
          <year>2021</year>
          . URL: https://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2980</volume>
          /paper374.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <surname>APOC</surname>
          </string-name>
          , Accessed:
          <fpage>2025</fpage>
          -01-
          <lpage>06</lpage>
          . URL: https:// neo4j.com/docs/apoc/current/.
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <surname>YARRRML</surname>
          </string-name>
          , Accessed:
          <fpage>2025</fpage>
          -01-
          <lpage>06</lpage>
          . URL: https: //rml.io/yarrrml/.
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <surname>Bruyat</surname>
          </string-name>
          ,
          <article-title>Julian, From property graphs to knowledge graphs, Theses</article-title>
          , INSA Lyon,
          <year>2024</year>
          . URL: https://hal.science/tel-04772451.
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>D.</given-names>
            <surname>Beckett</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Berners-Lee</surname>
          </string-name>
          , E. Prud'hommeaux, G. Carothers, RDF
          <volume>1</volume>
          .1 Turtle
          <string-name>
            <surname>- Terse RDF Triple Language</surname>
          </string-name>
          , Recommendation,
          <source>World Wide Web Consortium (W3C)</source>
          ,
          <year>2014</year>
          . URL: http://www.w3. org/TR/turtle/.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>