- From: Bob MacGregor <macgregor@ISI.EDU>
- Date: Thu, 14 Aug 2003 10:26:35 -0700
- To: Steve Harris <S.W.Harris@ecs.soton.ac.uk>, www-rdf-interest@w3.org
At 05:24 PM 8/14/2003 +0100, Steve Harris wrote: >On Thu, Aug 14, 2003 at 08:33:06AM -0700, Bob MacGregor wrote: > > >Its also quite awkward to query for, eg. in RDQL. I guess we need some > > >kind of idiom that means is a memeber of this list. Theres nothing that > > >logically comes from the structure though, unlike with collections. > >Er, I appologise for using the word logically here! I wasn't thinking. > > > You are absolutely correct -- querying RDF lists using RDQL as it exists > > today > > makes absolutely no sense. This kind of list is intended to be used in > > conjunction with some kind of recursion. If and when we have rules > > (e.g., RULEML) then writing a single memberOf rule is probably all that > > we would need to make it easy to extract items from a list within a query. > >Its hard to see how you would do that efficiently. A Java membership test takes time linear in the number of items in the list. You can do better than that if there is a reverse index (which there isn't in Java or in RDF:List). Absent that reverse index, using a rule should be within a small constant factor of optimal, if you have a good rule interpreter. > > But it would be better if this functionality were part of a W3C standard. > >Yes. > > > There ought to be an official "memberOf" property with domain RDF:Resource > > and range RDF:List that is true for each member of a list. Implementers of > > RDF servers might wish to implement such a property on their own, in hopes > > that the (future) RDF committee will see the light and formally bless > such a > > property some time in the future. > >Yeah, I hoped there would be such a thing, it would have to be a >property that couldn't be asserted manualy to prevent (partial) >modification of the list structure, so thats pretty messy. No so!. Suppose I have a list of people in line to see a movie that contains John, Fred, and Joe. Now, suppose I want to assert that Jane's boyfriend is waiting in line to see the movie. I can use a bnode (representing Jane's boyfriend) and memberOf to make the necessary assertion. So, making assertions of list membership that don't specify the position within the list makes perfect sense. Unfortunately, it can also make for headaches for implementers. For example, equality reasoning gets that much harder. Logic happens to get messy very fast when you start adding useful operations to it. Unfortunately, you just have to live with it. Cheers, Bob
Received on Thursday, 14 August 2003 13:31:09 UTC