Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2007
    Posts
    3

    Question Unanswered: Binary Tree implementation

    Hi Members

    I m new in this forum, I have have Binary Tree database in SQL Server with
    table fields(Mcode,Mname,LeftMCode,RightMCode). i want to display downline and pairs of each member.

    can any one help me out?

    Regards
    Amirbkk

  2. #2
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276
    read this.
    is for OLAP, but, maybe help you.

    http://www.codeproject.com/cs/database/tree_olap.asp

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    From your column names, I'm guessing your are dealing with a Nested Set model ala' Joe Celko, rather than the more common Adjencency Model.
    You should be able to find some code samples here:
    http://www.intelligententerprise.com...uestid=1266295
    ...or by googling "Celko Nested Sets".
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Feb 2007
    Posts
    3

    Question Problem with Binary Tree solutions

    Thanx for reply

    But i have little prob that all nodes will be freely put on any side means any member can be put on left or right side and my db will grow very fast and estimated records will be more than 100000 with in few months

    so if i use lineage and depth methods can i store path in one fields
    and if use set model than i think , left node must be fill first and right node must be +1 than its left node.
    and in my db any node(member) should be put on any side

    so guys and suggestion will be higly appreciated.
    i m going to build db with in few days , plz help me out.

    Regards,

    Amir

  5. #5
    Join Date
    Feb 2007
    Posts
    3

    Question Binary Tree Problem in SQLServer

    Thanx for reply

    But i have little prob that all nodes will be freely put on any side means any member can be put on left or right side and my db will grow very fast and estimated records will be more than 100000 with in few months

    so if i use lineage and depth methods can i store path in one fields
    and if use set model than i think , left node must be fill first and right node must be +1 than its left node.
    and in my db any node(member) should be put on any side

    so guys and suggestion will be higly appreciated.
    i m going to build db with in few days , plz help me out.

    Regards,

    Amir

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •