can property graph be transformed into a RDF dataset?

503 Views Asked by At

We know that neo4j and Titan use property graph as their data model, which is more complicate and flexible than RDF. However, my team is building a graph database named gStore which is based on RDF datasets. gStore can not support N-Quads or property graph because it can not deal with edges which have properties besides its label.

Below is a RDF dataset: <John> <height> "170" <John> <play> <football>

Below is a N-Quads dataset: <John> <height> "170" "2017-02-01" <John> <play> <football> "2016-03-04"

You can see that property graph is more general and can represent more relations in real life. However, RDF is more simple and our system is based on it. It is really hard to change the whole system's data model. Is there any way to transform a property graph into a RDF graph? If so, how to do it?

If the data model is well transformed, how can we query it? SPARQL language is used to query the RDF dataset, and neo4j has designed a Cypher language to query their property graph. But when we transform a property graph into a RDF graph, how can we query it?

1

There are 1 best solutions below

0
On

RDF is a mechanism to serialize graph data. You can store your data in Neo4j as a property graph, query it using cypher, and serialize it automatically as RDF for data exchange and interoperability. Check out the neosemantics plugin for Neo4j. It does exactly what you describe and more.

In the particular case you mention of properties in relationships, which RDF does not support, neosemantics will use RDF-star to avoid data loss during import/export.