From W3C Wiki
Revision as of 08:13, 23 September 2006 by DannyAyers (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

RDF has explicit support for unary and binary relations.

We can write unary relations, e.g. [[GoodBook]](book1) ala:

  <book1> rdf:type :GoodBook.

In fact, NotationThree has syntactic sugar for this:

  <book1> a :GoodBook.

Binary relations are straightforwardly represented as properties.

  <book1> dc:relation <book2>.

but some propositions, for example Chicago is between New York and Los Angeles don't fit naturally in either of those forms. However, NaryRelations can be reduced to binary using various patterns: ArgumentList, CurriedFunction, RecordDescription.

Another list-oriented style is equivalent to an Nary relation:

(:Chicago :NewYork :LosAngeles) a :Between.

Not particilarly self-documenting but some may be more used to the syntax.

By way of comparing RDF and TopicMaps, associations in topicmaps (CheckSpecAndCite) are naturally n-ary, though the 2-ary case seems to be quite common. (and associations are sorta molecular, built of atomic 2-ary arcs? again CheckSpecAndCite).

Another use case: using XQuery functions and operators, some of which are NaryRelations, as RDF properties; see also discussion 14Mar, FunctionsAndOperators.

Another use case - wanting to refer to a group of FOAF:Persons as a set, for the purpose of saying, 'this group of people P was at point S in space at time T in time, then at point S1 in space at time T1 in time'; without too much verbosity; then optionally stating things about the reason for existence of that group. for context, cf a discussion of modelling groups of N people, and a fuller description of the use case.

See also : Defining N-ary Relations on the Semantic Web