Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Heirarchical Data Structures. MS Access. Together?

Re: Heirarchical Data Structures. MS Access. Together?

From: --CELKO-- <joe.celko_at_northface.edu>
Date: 28 Jul 2003 09:54:14 -0700
Message-ID: <a264e7ea.0307280854.61d7d42f@posting.google.com>


>> one should not allow removal of a parent (i.e. someone that has
children)... any parent has (right - left - 1) / 2 = number of children. <<

I usually use (lft = rgt -1) to detect leaf nodes. If there is an index on (lft, rgt) or just (lft), the speed is pretty good.

 DELETE FROM Tree
 WHERE lft = rgt -1
   AND <<other conditions>>; Received on Mon Jul 28 2003 - 11:54:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US