Re: why I don't like default graphs in the DATASET proposal

Richard,

I can not give you a compelling use case, as obviously, whatever can be
achieved by a dataset without default graph can obviously be achieved by
a dataset with default graph...

But do you have a use case that would be solved by a dataset with
default graph, that a dataset *without* default graph would *not* solve?

  pa


second thought: this is not a use case as such, but a personal
experienve. The class Graph in the python library rdflib, embeds the
notion of namespace prefix. You can write:

  g = rdflib.Graph()
  g.bind("foaf", "http://xmlns.com/foaf/0.1/")
  print g.serialize()

I find this utterly annoying, because once I declare a prefix for the
sake of one particular serialization, it sticks with my graph forever. I
would much prefer:

  g = rdflib.Graph()
  prefixes = {"foaf": "http://xmlns.com/foaf/0.1/"}
  print g.serialize(prefixes)

this would, IMHO, be better design, and is a similar problem to the one
I see with the default graph.


On 09/30/2011 11:37 AM, Richard Cyganiak wrote:
> On 29 Sep 2011, at 16:42, Pierre-Antoine Champin wrote:
>> A such, I consider the default graph to be a *property of the SPARQL
>> engine* used to query the data, rather than a property of the data itself.
> 
> What's the problem with considering the default graph a property of the dataset?
> 
> Use cases, examples, test cases?
> 
> You present your personal opinion, and your preferred solution, and muse about how the non-preferred solution came about historically. I find none of this even remotely compelling unless some practical problems arise from including the concept of a default graph in the RDF spec.
> 
>> Imagine a world where SPARQL would have defined, as part of a dataset,
>> the notion of *default resource*, so that I could write
>>
>>  SELECT ?friend WHERE {
>>    foaf:knows ?friend
>>  }
>>
>> Would we feel compelled to include the default resource in RDF Concepts?
> 
> This is a distraction here, but yes, the notion of a specially marked “default resource” (which would likely be the base URI in graphs deployed on the web) would actually be extremely useful because it would provide a natural and unique way of chopping RDF graphs into trees for serialization.
> 
> Best,
> Richard

Received on Friday, 30 September 2011 13:18:13 UTC