I've read the spec but can't really figure out if it is allowed to have a blank node in an INSERT DATA SPARQL Update query. So, what would be the result of the following query:
Would it generate some (random) IRI for that blank node just as relational databases do for autoincrement columns?
If not, how could one possible create a IRI without having to check if it is already in use?
Thank you very much
asked 25 Oct '11, 07:48
That is allowed, yes. But the SPARQL engine will not generate an IRI for you - it will remain as a blank node in your triple store. (However, it should not keep the label "book1".)
If you need to generate an IRI, probably the easiest and most portable way is to generate one based on a UUID before assembling the INSERT.
answered 25 Oct '11, 07:57