Insert many connection in one line


I have in my scheme a predicate who is a type of [uid].
I want to set many uids in one line but I can’t mange to do that.
Instead of doing something like this:

_:r1 <Repository.active_memberships> [_:m1, _m2] .

I need to do that:

_:r2 <Repository.active_memberships> _:m2 .
_:r2 <Repository.active_memberships> _:m3 .
_:r2 <Repository.active_memberships> _:m4 .

m1-4 are memberships

Is it possible to connect many nodes at once instead of in many triples?


Not possible.

RDF syntax is a triple that means a single Subject (_:r1) linked to a single Object (_:m2) by a linking Predicate (<Repository.active_memberships>) in the order of S O P .

The RDF syntax does not distinguish this SPO any different between creating edges (links between nodes) and creating predicates (links to properties). Nor does the RDF syntax distinguish this SPO any different between lists or single objects.

From my understanding and use of the RDF syntax, it is suppose to be the data in the simplest form. This makes exporting and importing to and from this format really fast because it is easier to parse.

Rdf bags can be useful in these scenarios (just for expressing data in a compact manner). We don’t support this option yet.

1 Like