W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2000

Order by reification

From: Sergey Melnik <melnik@db.stanford.edu>
Date: Wed, 10 May 2000 17:13:55 -0700
Message-ID: <3919FB43.75B1938F@db.stanford.edu>
To: RDF Interest Group <www-rdf-interest@w3.org>
The upcoming release of the API [1] will include an experimental
feature: order by reification.

Background: currently there is no standard way of defining ordered
binary relationships in RDF. Ordered binary relationships are required
for building ordered n-ary relationships. I'm modeling order using
reification. Thus, modeling that book B has first author Foo and second
author Bar has the following model:

B --dc:Creator--> Foo
B --dc:Creator--> Bar
(B --dc:Creator--> Foo) --rdf:order--> 1
(B --dc:Creator--> Bar) --rdf:order--> 2

1 and 2 are literals, not ordinal properties of RDF (rdf:_n), although
is doesn't make a big difference, just that you don't need rdf:_n and
the syntax is simpler. rdf:order is not defined in RDF M&S spec, it's an

This approach is backward compatible, i.e. applications that do not
support order can still determine that both Foo and Bar are authors of
B. This is not the case when defining order using rdf:Seq-based

Backward order is also supported, so if you have two parents {A, B} that
have children {P, Q, R}, one can express that B is the second parent of
the third child R as follows:

B --child--> R
(B --child--> R) --rdf:order--> 3
(B --child--> R) --rdf:backwardOrder--> 2

I introduced extensions to SiRPAC and SiRS (serializer) included in the
API. The syntax for ordered relationships looks like the following (book
example above):

<rdf:Description about="B">
  <dc:Creator rdf:order="1">Foo</dc:Creator>
  <dc:Creator rdf:order="2">Bar</dc:Creator>

If the objects are resources (not literals as above), the example can be
written either as:

<rdf:Description about="B">
  <dc:Creator rdf:order="1" rdf:resource="Foo"/>
  <dc:Creator rdf:order="2" rdf:resource="Bar"/>

or also in a less verbose fashion using XML-inherent ordering:

<rdf:Description about="B">
    <rdf:Description about="Foo"/>
    <rdf:Description about="Bar"/>

In the last example, the property element <dc:Creator> contains more
than one resource element. If more than one element is found by the
parser (invalid in the current official syntax), assertions about
reified statements are added to the model. Backward order can be
additionally specified as follows:

<rdf:Description about="B">
    <rdf:Description rdf:backwardOrder="3" about="Foo"/>
    <rdf:Description rdf:backwardOrder="5" about="Bar"/>

that could mean something like B is the third book written by Foo and
the fifth one authored by Bar.

The API [1] fully supports manipulations with reified statements.

Comments and suggestions are welcome. I'll try to take them into
consideration for the upcoming release.


[1] http://www-db.stanford.edu/~melnik/rdf/api.html
Received on Wednesday, 10 May 2000 20:03:01 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:29 UTC