Typically people think of RDF as graph. But it is actually a subject of research on how to represent RDF as formal Graph.
I will show examples of RDFs and how they would be represented as formal graph if we do naive “transformation”.
See: A Comparative Study on Representing RDF as Graph and Hypergraph Data Model.
Directed graph
RDF
:a → ex:1 → :b
:c → ex:1 → :d
Graph
Not quite what we want - we can’t distinguish that there is no connection between :a
and :d
.
Directed labeled graph
RDF
:a → ex:1 → :b
ex:1 → ex:2 → :d
Graph
Not quite what we want - we can’t use label as start (or end) of an edge.
Bipartite graph
See: Bipartite Graphs as Intermediate Model for RDF-star, Inductive Triple Graphs: A purely functional approach to represent RDF
RDF
:a → ex:1 → :b
ex:1 → ex:2 → :d
Graph
Some observations:
- it is bipartite graph
- but also directed labeled graph with only three labels:
s
- subjectp
- predicateo
- object
- It is also visually reminds standard RDF reification
- but it looks nothing like what original RDF “graph”
Directed hypergraph
See: Directed hyper-graphs for RDF documents
To be precise it is 3-unifor F-hypergraph with additionally defined function(s), which tells which node is subject, object and tail (on the graph I use edge labels to denote this, but this is for visual purposes only, this is no labeled graph)
RDF:
:a → ex:1 → :b
ex:1 → ex:2 → :d
Graph:
as bipartite graph
The Labeled Directed Multigraph with Triple Nodes (LDM-3N)
See: A Formal Graph Model for RDF and Its Implementation
RDF:
:a → ex:1 → :b
ex:1 → ex:2 → :d
RDF triple is splitted into two labeled edges - they get same unique suffix and one of two suffixes: I
stands for initial, T
stands for terminal.