dynamic naming for hierarchical problem
Alex Martelli
aleaxit at yahoo.com
Sat Aug 11 05:41:24 EDT 2001
"gzeljko" <gzeljko at sezampro.yu> wrote in message
news:mailman.997499838.6140.python-list at python.org...
> From: Jeremy and Debra Jones <dnjjones at yahoo.com>
> >
> > It seems like if you were to do it in a rdbms, you would need at least
two
> > tables:
...
> No, one table:
> TBL
> ( PARENT, CHILD, CHILD_ATRIBUTE1,..,
> PRIMARY KEY (PARENT, CHILD))
Something wrong with this constraint, since it implies a child may
have multiple parents. I think CHILD by itself needs to be the
primary key. Otherwise I agree -- no need to use multiple tables
for a parent/child relationship. Rather, since children appear to
have varying attributes, you'll need to split THOSE off into a table
of their own (with CHILD as a foreign key).
Alex
More information about the Python-list
mailing list