[topicmapmail] Any design guidelines for roletyping?

Marc de Graauw marc@marcdegraauw.com
Wed, 1 Jan 2003 15:09:13 +0100


Hi,

When I have role types in an association there are two possible approaches:

1) Use topic types as role types.

The Opera Topic Map does this frequently, i.e.: 'Aida' composed-by 'Verdi', in
this association the roleSpec of 'Verdi' is the topic 'composer'. Verdi,
however, is a topic of topic type 'composer' too. So the topic 'composer' is
used both to type topic 'Verdi' and to specify the role 'Verdi' plays in an
association. ('Composer' is also a subclass of 'person'.)

2) Keep topic types and role types separate.

Sometimes solution 1) is unnatural. I have a lot of topics of type 'person'.
The persons can be married, and this is modelled with a 'marriage' association
between two topics of type 'person'. I.e. 'Susan Smith' is-married-to 'John
Smith'. Now the types of the roles in the association naturally become
'husband' and 'wife'. Making 'Susan Smith' a topic of type 'wife' and make
'wife' a subclass of 'person' is unnatural, since Susan is only a wife by
virtue of her participation in the 'marriage' association, so when the
association is deleted we would have to change Susan's topic type from 'wife'
to 'person' (or 'unmarried person').

My question: is it preferable to use approach 1 only, or approach 2? Approach
1 seems to make it easier to build user interfaces, since we could make a user
interface which allows only topics of type 'composer' to be used as the
'composer' role in in the composed-by association. If I want to do that with
approach 2, I need to record somewhere which topic types are eligible as
'wife' in the 'marriage' association. On the other hand, playing a role in an
association and being a topic of a certain type seem different things, so
mixing the two seems wrong. Is mixing the two approaches harmless or is it
better to avoid this?

Does anyone have any design guidelines they follow themselves?

Cheers, Marc