[Grok-dev] Re: Implementing an N-to-N relationship

Luciano Ramalho ramalho at gmail.com
Thu Jun 7 15:01:13 EDT 2007

On 5/28/07, Martijn Faassen <faassen at startifact.com> wrote:
> Finally, there is RDF. It makes sense if you took a look at how RDF
> models relationships. Not because we want RDF support any time soon, but
> to check whether we aren't leaving out something important.

I just read a few chapters from Practical RDF, by Shelley Powers [1]
and found a mismatch between what we need in Kirbi to map books to
creators and the RDF unit, the triplet.

[1] http://www.google.com.br/books?id=88yzElvD9sgC

Perhaps I need to be enlightened by somebody who groks RDF better than
me, but here is the issue:

The RDF triplet consists of a subject, a predicate and an object.
Superficially, there is a perfect match to what we need to model in
Kirbi: the subject is a book, the predicate is a role, and the object
is a creator. In RDF the subject can be an URI or a blank node, the
predicate must be a URI, and the object can be an URI, a literal or a
blank node. This means that the vocabulary for the predicate is
enforced (it must be an uriref), but the object maybe anything
(literals are accepted).

However, in practical terms for book metadata, it is crucial that we
have the subject (book) and the object (creator), but the predicate
(role) is not as important. For the end-user looking for "The
Annotated Alice" [2] what matters is the name of Martin Gardner, and
the fact that he has a specific role in that work (as editor) is not
so relevant. In fact, many book metadata sources on the web do not
list the role of the creators, and for Kirbi, having the book-creator
relationship data without a predicate is much better than nothing. The
same applies for movies. People looking for "Clint Eastwood movies"
often do not care whether he is an actor, director or both in a
particular film. Looking for films directed by Clint Eastwood is a
more advanced search.

[2] http://www2.wwnorton.com/catalog/fall99/alice.htm

In conclusion, for a Book-Creator or Movie-Creator relationship to be
useful, the Book/Movie and the Creator must refer to existing
entities, but the Role that links the two maybe anything, even blank.
To represent this in RDF we would need to use some default value for
the Role predicate when it is unknown, and create a vocabulary of Role
values, which is an unnecessary complication in my opinion. So RDF
does not map perfectly to our needs.

But I've already noticed that reading about it was useful to make more
sense of the jargon used in the zc.relationship documentation.



More information about the Grok-dev mailing list