[ZODB-Dev] Referential integrity

Toby Dickenson tdickenson@geminidataloggers.com
Fri, 01 Mar 2002 15:51:23 +0000


On Fri, 1 Mar 2002 16:39:54 +0100, Arnaud Bienvenu
<arnaud.bienvenu@makina-corpus.org> wrote:

>Now imagine some country disappears : the person in charge of =
maintaining
>the list of countries up to date will remove it from the pool. I would =
like
>something to happen for every Person instance that refers to this =
country,

=46orget that 'ZODB' has the word 'database' in its title....

Now, what techniques would you use to solve the same problem if your
data structures were simple lists in a Python script? The same
techniques apply whether or not those lists happen to be stored in
ZODB.=20

>because I don't want them to refer to some country that is not in the
>official list.

Youve just highlighted one of the difference between referential
integrity in ZODB and relational databases: In ZODB it is possible for
a person to have a reference to a country which is not in the official
list/table of countries. In other words, not all countries have to be
in the official list/table.



Toby Dickenson
tdickenson@geminidataloggers.com