Re: help with nested set
From: lawpoop <lawpoop_at_gmail.com>
Date: Mon, 13 Apr 2009 09:53:02 -0700 (PDT)
Message-ID: <5ccdebeb-7c51-446f-b6bb-1e6565d7b26a_at_e12g2000vbe.googlegroups.com>
Date: Mon, 13 Apr 2009 09:53:02 -0700 (PDT)
Message-ID: <5ccdebeb-7c51-446f-b6bb-1e6565d7b26a_at_e12g2000vbe.googlegroups.com>
On Apr 13, 9:27 am, paul c <toledobythe..._at_oohay.ac> wrote:
> lawpoop wrote:
>
> ...
>
> > Suppose I had this adjacency list:
>
> > id client_id parent_id level
> > 1 1 NULL Corporate
> > 2 1 1 Franchise 1
> > 4 1 1 Eastern Region
> > 5 1 4 New York District
> > ...
>
> Can't comment on product techniques but if this were a 'table', I'd
> wonder how a client can be its own parent. I would have thought some
> constraint would prevent that.
MySQL check constraints are somewhat limited; what would you suggest? Received on Mon Apr 13 2009 - 18:53:02 CEST