Go Back   Forum Care Forums > Development Reference Area > MySQL Discussion

Reply
 
LinkBack Thread Tools Display Modes
nested set: algorithm for testing the integrity
Old
  (#1)
Guest
Guest
 
Posts: n/a
Default nested set: algorithm for testing the integrity - 06-04-2007, 07:58 AM

I'm looking for a algorithm which checks if a nested set with many
nodes and levels is correct.

I know the pear cl*** and I have read a few tutorials, maybe there is
a mathematical solution for this test?

thx.

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: nested set: algorithm for testing the integrity
Old
  (#2)
lark
Guest
 
Posts: n/a
Default Re: nested set: algorithm for testing the integrity - 06-04-2007, 07:58 AM

EMAIL REMOVED wrote:
> I'm looking for a algorithm which checks if a nested set with many
> nodes and levels is correct.
>
> I know the pear cl*** and I have read a few tutorials, maybe there is
> a mathematical solution for this test?
>
> thx.
>


i think you're talking php.
check http://www.phpcl***es.org


--
lark -- EMAIL REMOVED
To reply to me directly, delete "despam".
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: nested set: algorithm for testing the integrity
Old
  (#3)
--CELKO--
Guest
 
Posts: n/a
Default Re: nested set: algorithm for testing the integrity - 06-04-2007, 07:58 AM

>> algorithm which checks if a nested set with many nodes and levels is correct. <<

1) Buy a copy of TREES & HIERARCHIES IN SQL
2) Create a view called LftRgt which has all the lft and rgt values
unioned in it
3) No gaps in the numbering: (SELECT MAX(rgt) FROM Tree) = (SELECT
COUNT(*) FROM LftRgt)
4) No duplicated values: NOT EXISTS (SELECT seq FROM LftRgt GROUP BY
seq HAVING COUNT(*) > 1)
5) No overlapping (lft, rgt) pairs: an exercise for the reader


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top