Andrew Snow wrote:
>
>
> Can anyone see any problem with the following, practice?
No problem at all. With that setup there can never be a
subchild without the matching child, even if the parent
exists. If a child is deleted, it's subchildren follow, no
need to touch the parent. If that's the relationship of the
data, go ahead.
Jan
>
>
> CREATE TABLE parent (
> foo SERIAL PRIMARY KEY
> );
>
> CREATE TABLE child (
> foo INTEGER PRIMARY KEY REFERENCES parent ON DELETE CASCADE,
> bar TEXT
> );
>
> CREATE TABLE subchild (
> foo INTEGER PRIMARY KEY REFERENCES child ON DELETE CASCADE,
> bar2 TEXT
> );
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com