W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2004

RE: RDF Graph Patterns

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Mon, 17 May 2004 20:23:42 +0100
To: "'Pat Hayes'" <phayes@ihmc.us>
Cc: "'RDF Data Access Working Group'" <public-rdf-dawg@w3.org>
Message-ID: <000301c43c44$7a107c80$0a01a8c0@atlas>



-------- Original Message --------
> From: Pat Hayes <mailto:phayes@ihmc.us>
> Date: 17 May 2004 18:37
> 
> > RDF Graph Patterns::
> > 
> > An RDF Graph Pattern is a description of a set of RDF subgraphs.  If
> > an RDF graph is in the set then it is said to match the graph pattern.
> > 
> 
> Sound too general to me. For example, one can describe RDF graphs
> using reification, but I wouldnt want to count that as a 'pattern'.
> Suggest instead your first example as a suitable definition of pattern.

I didn't mean that only patterns describe a set of subgraphs but I take your
point.

> 
> > (If anyone can define 'match' further without getting into defining
> > the expressiveity of the pattern, do suggest something).
> > 
> > c.f regular expressions and strings - and we get to define the
> > expressivity of the graph pattern expression language.
> > 
> > Example: Simple case::
> > 
> > RDF Graphs are defined in http://www.w3.org/TR/rdf-concepts/ in terms
> > of RDF triples.  An RDF triple pattern is an RDF Triple with the
> > addition that subject, predicate or object can be a named query
> > variable as well as the items defined in "RDF Concepts".  An RDF Graph
> > Pattern is a set of RDF Triple Patterns.
> 
> That would be my definition, not an example.

What about variable length paths e.g. ?x -> <p>* -> ?y (if we want to have
them of course).  A suitable defn os set membership might be OK but it seems
a bit contorted.

(A whiteboard at WWW would sort this out)

> 
> > 
> > A match is an association of RDF graph labels and the variables, such
> > that substituting the labels for variables yields an RDF subgraph of
> > the source RDF graph. 
> > 
> > In matching, if a query variable is used in more than one triple
> > pattern, and/or more than once in a single triple pattern, it must be
> > bound to the same label in any one query solution.
> 
> That should be part of the definition of 'substitute for a variable'.
> It kind of falls out of he way that RDF graphs syntax is defined in
> terms of sets rather than as expressions.
> 
> > 
> > Discussion::
> > 
> > This is the conjunctive form of graph patterns : its an RDF graph with
> > some of the subject/predicate/object replaced by query variable (not
> > bNodes of the graph).  If we have disjunction in any form, then just a
> > graph-with-variables isn't enough - we need a construction to express
> > disjunction or (maybe) reify the query pattern.
> 
> Or think of it as a set of query graph patterns.

Agreed.

> 
> > 
> > This does not say anything about restricting labels matched by value
> > or lexical form.  There may well be syntactic sugar to make this
> > easier to write but it is equivalent to putting a variable (not part
> > of the results for the variable binding case) into the graph pattern
> > and, separately, writing an expression limiting the range of values
> > for the label.
> 
> True, but we could accommodate that into this definition of pattern
> by allowing 'variables' to be more highly structured things, like
> describing sorted quantification as quantification over sorted
> variables. 

Just to check I understand here: we then need operators to pick out the
parts of the variables: e.g. lang(?x) to get the lang tag 

(minor question: what is the type of a lang tag?  String?).

> 
> > 
> > I'd like to see a building block being a conjunctive graph pattern
> > with a set of restrictions on labels.
> 
> Sounds about right to me, though I think we need to be very careful
> to describe those restrictions appropriately. One kind of useful
> restriction might be to a datatype, to constrain literal bindings (?).
> 
> Pat
> 
> > 
> > 	Andy
Received on Monday, 17 May 2004 15:24:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:19 GMT