Re: newbie modelling question

Actually, RDF statement reification is overkill (and gets you into a lot 
of potential trouble) for this kind of thing.  What you need in this 
case is essentially a 3-ary relation something like

Editor (Spec, Person, Employer)

while RDF allows (natively) only binary relations, as in

Editor (Spec, Person)
Employer (Person, Organization)

(your relation and entity type names may vary).

A general approach to dealing with this is to make the higher-arity 
relation (or part of it) into a new kind of resource.  So one approach 
(making only part of the relation a new resource) might be:

FooSpec --editedBy--> Editor1
FooSpec --editedBy--> Editor2
...

Editor1 --person--> Joe Bloggs
Editor1 --worksFor--> BT

Editor2 -->person--> John Smith
Editor2 -->worksFor--> MossBros
...

BarSpec -->editedBy--> Editor4
BarSpec -->editedBy--> Editor5
...

Editor4 --person--> Joe Bloggs
Editor1 --worksFor--> Microsoft

Editor5 -->person--> John Smith
Editor5 -->worksFor--> MossBros
...

Or, making the whole relation a new kind of resource, you'd have:

Editor1 --SpecEdited--> FooSpec
Editor1 --person--> Joe Bloggs
Editor1 --worksFor--> BT

Editor2 --SpecEdited--> FooSpec
Editor2 --person--> John Smith
Editor2 --worksFor--> MossBros

Editor3 --SpecEdited--> BarSpec
Editor3 --person--> Joe Bloggs
Editor3 --worksFor--> Microsoft

Editor4 --SpecEdited--> BarSpec
Editor4 --person--> John Smith
Editor4 --worksFor--> MossBros
...

You can add whatever additional attributes you want (like the dates 
during which someone worked for whoever) using this kind of approach too.

There's a best practices Working Draft covering this sort of think at 
http://www.w3.org/TR/swbp-n-aryRelations/

--Frank

Denny Vrandecic wrote:
> 
> Dynamics always hurt a bit when using RDF, and I surely hope we'll get a 
> best practice note on this someday, but for now I would reificate the 
> statements (the following notation shall say [s p o n] = subject 
> predicate object nameOfTheTriple, and is used as a shorthand notation 
> for reification).
> 
> Now you can use
> ["Joe Bloggs" worksFor BT s1]
> ["Joe Bloggs" worksFor Microsoft s2]
> [s1 stated 01-15-04]
> [s2 stated 11-15-05]
> or
> [s1 startsBeingTrue 01-15-04]
> or whatever - in short, you need some temporal logics and an inferencer 
> who turns your reificated statements into actual ones in case they are 
> valid.
> 
> I don't know about any inferencing engine capable of this, sorry, but we 
> will certainly be in need of such a construct sooner or later (this will 
> be possible with rules, methinks, but that's another story).
> 
> If I'm wrong I would be gladly pointed to my errors,
> hope this helps,
> denny
> 
> paul.downey@bt.com wrote:
> 
>> i'm just starting out with all this RDF stuff and as a learning 
>> exercise decided to model the editorship of a set of specifications, 
>> e.g.:
>>
>>   FooSpec:
>>     Joe Bloggs, BT
>>     John Smith, MossBros
>>     Bill Poster, NewsCorp
>>
>> So my first attempt was to write:
>>
>>   WS-Foo --editedBy--> Joe Bloggs
>>   WS-Foo --editedBy--> John Smith
>>   WS-Foo --editedBy--> Bill Poster
>>
>> and then:
>>
>>   Joe Bloggs --worksFor--> BT
>>   John Smith --worksFor--> MossBros
>>   Bill Poster --worksFor--> NewsCorp
>>
>> but then along comes:
>>
>>   BarSpec:
>>     Joe Bloggs, Microsoft
>>     John Smith, MossBros
>>     Bill Poster, NewsCorp
>>
>> Joe Bloggs represented BT on the FooSpec but took the
>> yankee dollar and worked for Microsoft on the BarSpec.
>>
>> So i need to express which company a person was working
>> for when they edited a given spec, a triple in which one
>> of the nodes is a pair of values ..
>>
>> What's the best way of saying this in RDF?
>>
>> TIA
>> Paul
>>
> 

Received on Tuesday, 30 November 2004 16:58:26 UTC