W3C home > Mailing lists > Public > www-rdf-interest@w3.org > October 2004

Re: Troublesome relations

From: Danny Ayers <danny.ayers@gmail.com>
Date: Tue, 19 Oct 2004 15:01:55 +0200
Message-ID: <1f2ed5cd0410190601537eef5@mail.gmail.com>
To: Adrian Walker <adrianw@snet.net>
Cc: www-rdf-interest@w3.org

On Tue, 19 Oct 2004 08:17:39 -0400, Adrian Walker <adrianw@snet.net> wrote:
> Danny --
> 
> I don't see much of a conflict,  {relational,RDF} religious dogma aside.
> 
> To oversimplify a bit, a triples form of RDF can be treated as a ternary
> relation.  There's quite a bit of work that one can find via Google on
> storing and indexing such triples usefully in Oracle and the like.

Sure, but the "irreducible n-order predicate" bit would suggest that
it isn't possible to go the other way, to store RDBMS data as triples
in the general case.

> One concern though, is that writing queries, and understanding what they
> are returning, can be much harder if we insist on storing everything at low
> arity.

Isn't it better to decouple the query writing from the underlying
storage? Say your Oracle-based triplestore used a simple s,p,o schema.
You can use SQL VIEWS to allow domain specific n-ary queries (example
below, though maybe not an ideal demo as the store is ternary and the
results binary ;-).

Cheers,
Danny.

sqlite> CREATE VIEW jobs AS SELECT
   ...> JobTitles.object,
   ...> JobSalaries.object
   ...> FROM
   ...> triples Jobs,
   ...> triples JobTitles,
   ...> triples JobSalaries
   ...> WHERE
   ...> Jobs.property == "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
   ...> AND
   ...> Jobs.object == "http://xmlns.com/wordnet/1.6/Job"
   ...> AND
   ...> JobTitles.property == "http://ilrt.org/discovery/2000/11/rss-query/jobvo
cab.rdf#title"
   ...> AND
   ...> JobTitles.subject == Jobs.subject
   ...> AND
   ...> JobSalaries.property == "http://ilrt.org/discovery/2000/11/rss-query/job
vocab.rdf#salary"
   ...> AND
   ...> JobSalaries.subject == Jobs.subject;

sqlite> select * from jobs;
Job title for job1 goes here|100000
Job title for job2 goes here|150000

(from http://dannyayers.com/beg-rss/)

-- 

http://dannyayers.com
Received on Tuesday, 19 October 2004 13:01:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:52:10 GMT