On Fri, Nov 11, 2005 at 03:50:25PM +0100, Helmut Merz wrote:
> A relation is an object providing the IRelation interface. This
> has got two attributes ('first', 'second' - dyadic relation) or
I've done this kind of thing in relational databases. Problem with 'first'
and 'second' is that it seems to imply some order. And if I try to find
all relations from an object I allways have to compare my ID to either
first or second.
I solved my problem by chopping a relation into three parts: the relation
itself and both endpoints. In my database this generated an extra table
(and some more work when writing queries), but the solution became more
generic and flexible in the end.
(See the database diagram on
http://www.drbob.org/datamodel/drbob_datamodel.htm . The two endpoints of
a relation are stored in two object_link records, the relation itself in
one link record.)
"Nothing is as subjective as reality"
Reinoud van Leeuwen [EMAIL PROTECTED]
Zope3-dev mailing list