Re: shared bnodes (Skolems, SPARQL)

On 2012-08-29, at 13:15, Sandro Hawke wrote:
> On 08/28/2012 11:52 AM, Steve Harris wrote:
>> On 2012-08-24, at 16:52, Sandro Hawke wrote:
>>  snip 
>>>> And sub/union graphs in general.
>>>> Union graphs for those systems that already make one graph the union of all others.  Whether we like it or not, those systems are common, even maybe even the majority, and have been for several years.
>>>> It is the compromise of the context point-of-view and the multiple-graphs point-of-view.  In the context POV,
>>>> (this is not advocacy, more like 'history')
>>> agreed.
>>> To put that slightly differently: shared bnodes are also required for the SPARQL dump & restore use case.
>> Yup, that was one of the motivations for Skolem URIs.
> How would that work, if there was already Skolmized RDF in the dataset?    (And there will be, if your dataset comes from crawling other people's data sources, and those data sources emit Skolemized RDF, as we're expecting they will sometimes.)
> I guess you could make a new Skolem prefix (eg and genid your bnodes to new URLs starting with that string -- and then pass that string along with the backup file.     But keeping those together might be difficult, and if you're going to do that, there's no need for any sort of standard format for Skolems.

Well, in 4store (for e.g.) the Skolem URIs generally look like:[UUID_for_DB]/[ID_number]
so the store can recognise it's own bNodes, and convert them back into internal IDs if it gets them back.

Other Skolem URIs in .well-known form can also be converted into new internal bNode identifiers, in the same way bNode labels are, but they're globally unique, so you can safely map any Skolem URI to the same bNode ID across graphs. I don't know for sure if 4store does this or not, but it could. To be honest bNode sharing in Trig hasn't come up in user requests, so I don't think anyone's tried it.

- Steve

Steve Harris, CTO
Garlik, a part of Experian
+44 7854 417 874
Registered in England and Wales 653331 VAT # 887 1335 93
Registered office: Landmark House, Experian Way, Nottingham, Notts, NG80 1ZZ

Received on Wednesday, 29 August 2012 12:43:38 UTC