oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

Casey Duncan cduncan@kaivo.com
Fri, 11 May 2001 16:06:16 -0600


Cees de Groot wrote:
> 
> Joachim Werner <joe@iuveno-net.de> said:
> >[...]. E.g. how would
> >you handle objects beloning to more than one container? In SQL this is easy
> >(Just have a table that matches key pairs from the container table and the
> >item table). And I don't know any good way of implementing "many-to-many"
> >relations in object hierarchies. Let alone querying them efficiently.
> >
> Probably I'm daft because it is Friday night, but AFAIK ZODB and most OODB's
> store an object only once, keyed by its object id. The rest is just references
> through that oid, so objects that belong to more than one container can be
> added to all these containers and n:m relations are implemented by having a
> list of objects on both sides.

This is true in the ZODB, but can be complicated by acquisition. If an
object can acquire itself, it can cause issues. Plus it becomes
difficult to know whether objects are clones or just identical
instances, although this can be mitigated by exposing their Python
instance id.

-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>