Hierarchies on Steroids #1: Convert an Adjacency List to Nested Sets

  • There is no hierarchical REFERENCES clause in SQL Server.  If that's not what you meant, the only other thing that I can think of is some form of DRI and I'm not sure how that would help.  Could you explain what you meant?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • I don't want a hierarchical REFERENCES clause (I am not even sure what that would mean) . But by putting the nodes in one table that reference and the nodes in a separate table, I can have several structures. So one table might be "Personnel" for the company as a whole and then would have a second table that aggregates the employees into "baseball teams", particular projects or whatever. This has the advantage that when an employee is removed from the company, this will also cascade over to the baseball teams, project teams, or whatever. The best way to do this is an ON DELETE SET NULL or ON DELETE SET DEFAULT subclause, but it means you had to do the subordinate hierarchies with careful declarations.

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Ah... so you meant a REFERENCES clause in a bit of DRI.  Understood.  I wasn't getting that from your post.

    As attractive to some as it is, I'm not likely to ever use an ON DELETE SET NULL or ON DELETE SET DEFAULT because they simply allow too many people to make mistakes.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This reply has been reported for inappropriate content.

    except that we write the top-most part at the left: 1.3.6.1.4.1.99999.117.115.101.114

    An OID is just a unique key (within one managed device) for one piece of information Ensures vendors don't have conflicting OIDs

    OID corresponds to a label .1.3.6.1.2.1.1.5 => sysName (in windows this is the servername)

    The complete (translated) path: .iso.org.dod.internet.mgmt.mib-2.system.sysName

    The info needed to get fro

    http://techappen.xyz/

    http://techappen.xyz/sarkari-results/

    http://techappen.xyz/rdxhd-rdx-hd-movie/

    http://techappen.xyz/majhi-naukri/

    http://techappen.xyz/rojgar-results/

     

Viewing 7 posts - 91 through 96 (of 96 total)

You must be logged in to reply to this topic. Login to reply