Tree Spanning Algorithm

Results 1 to 2 of 2

Thread: Tree Spanning Algorithm

  1. #1
    Join Date
    Dec 1969

    Default Tree Spanning Algorithm

    i am trying to implement a binary tree spanning algorithm with the tree stored in an access database (each record in the database table contains the rootid,leftchildid and the rightchildid). Can i get some help on how to do it using ASP ?

  2. #2
    Join Date
    Dec 1969

    Default Bad idea...

    Relational databases are *ROTTEN* things to store trees in!<BR><BR>About the only useful thing you can do with such a tree is read the entire thing into memory and then use it in memory.<BR><BR>With ASP, you do this using ADODB.RecordSet.GetRows. Assuming that the Primary Key is an autonumber field, then the row number of a record in the 2D array you get from GetRows will just be one less than the PK field, so traversing the tree is easy.<BR><BR>But other than that, you should avoid trees when working with relational DBs.<BR><BR>

Posting Permissions

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