- From: by way of <swick@w3.org>
- Date: Wed, 04 Sep 2002 09:51:22 -0400
- To: www-rdf-interest@w3.org
[freed from spam filter -rrs] Date: Wed, 4 Sep 2002 09:37:51 -0400 (EDT) Message-Id: <F9296CD2B127D311BF0D0090274D490001EEE95C@cscnt2.intra.csc.es> From: RLOZANO@clinic.ub.es Received: by mir.intra.csc.es; (5.65v4.0/1.3/10May95) id AA10767; Wed, 4 Sep 2002 15:37:42 +0200 Received: by cscnt2.intra.csc.es with Internet Mail Service (5.5.2448.0) id <SDZK1XYM>; Wed, 4 Sep 2002 15:33:12 +0200 Message-Id: <F9296CD2B127D311BF0D0090274D490001EEE95C@cscnt2.intra.csc.es> To: www-rdf-interest@w3.org Suppose you are asking an ontology that holds information on multinational companies with a hierarchical relation between them: (A class company) (B class company) (C class company) (B purchasedBy A) (C purchasedBy B) in this model someone that works for C works for A too. How do you manage this?. In general, how do you manage the problem of inheritance, which is recursive with the proposed schema ? But you don’t need recursive questions to have problems since you use a join of the table with itself for each clause. So, a question with a few clauses on a model with some thousands statements will be very inefficient. The problem is in the data model chosen, I think is too simple. Cheers, Raimundo Lozano > -----Mensaje original----- > De: matt@picdiary.com [mailto:matt@picdiary.com] > Enviado el: miércoles, 21 de agosto de 2002 21:45 > Para: www-rdf-interest@w3.org > Asunto: an algorith to query triple stores in SQL > > > > Some time ago (perhaps 18 months now), inspired by the proposed SQL > structures for triple storage presented in > http://www-db.stanford.edu/~melnik/rdf/db.html , I came up > with a system > to automatically convert triples queries (in the style of RDFDB) into > SQL that could query a database with a schema similar to Eric Miller's > 'naive approach'. > > For example, > > select ( ?x ?y ) from triple where (?x worksFor ?y) (?y name 'BBC') > > is translated to > > SELECT a1.subject as x, a1.object as y > FROM triple a1,triple a2 > WHERE > a1.pred = 'worksFor' > AND a2.subject = 'BBC' > AND a2.pred = 'name' > AND a1.object = a2.subject > > Encouraged by (amongst others) Dan Brickley, Edd Dumbill and Libby > Miller, I finally got round to writing up this system and releasing > sample implementations in perl and php. Since I coded the original > system, Libby has based parts of the SquishQL query system on > it, and Dan > has in turn based some of his code on that. > > The writeup makes it explicit that I encourage reuse of the system and > am happy to see it put to use in projects like this. The algorithm's > pretty simple and is language-independent (Libby > transliterated it into > Java with many improvements, and Dan converted that code into Ruby). > > More details here: http://www.picdiary.com/triplequerying/ > > Cheers, > Matt. >
Received on Wednesday, 4 September 2002 09:51:42 UTC