[Zope3-dev] Yet Another Relations (aka Reference) Engine...
Reinoud van Leeuwen
reinoud.v at n.leeuwen.net
Fri Nov 11 10:37:23 EST 2005
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 reinoud.v at n.leeuwen.net
http://www.xs4all.nl/~reinoud
__________________________________________________
More information about the Zope3-dev
mailing list