[Tutor] Re: implementing relationship between objects

Adam Groszer adamg@mailbox.hu
Tue Apr 1 03:18:01 2003

>My question too: tell us a bit more about what you want to accomplish. And
>consider, based on what you've told us so far, using a database to manage
>these relationships, as that's what (inter alia) they're good at.

My problem is that I'm trying to move from relational data storage to object
oriented. Currently I'm trying to use ZODB as persistence, but as I know
ZODB does not provide 'relations' or 'referential integrity' and such
things. It simply 'stores' my objects.
So I have to implement somehow all these 'basic' things. (Or is there any
module or package to accomplish this?).

This is the background of the question.

My current 'basic' problem is how to implement the 'relations' in python

Let's say I have a car which has some main parts:
car[part1] = 1 piece part(chassis)
car[part2] = 1 piece part(engine)
car[part3] = 4 piece part(wheels)
car[part4] = 2 piece part(seat)

Thank you,