Tree Structures
-
I need to document a number of tree type structures and wish to use SQL as the data source and ideally a .NET ASP front end. Ideally I want to store all data in one structure and allow users to navigate through the different structures and jump between them at relevant nodes. The tree structures are a network infrrastructure with multiple routes between switches, the power distribution feeding all the switches and the building structure where the various physical items exist. I'm after some ideas on the data structure, I have a few different structures in mind but the all have downfalls or complexity. SteveJ
-
I need to document a number of tree type structures and wish to use SQL as the data source and ideally a .NET ASP front end. Ideally I want to store all data in one structure and allow users to navigate through the different structures and jump between them at relevant nodes. The tree structures are a network infrrastructure with multiple routes between switches, the power distribution feeding all the switches and the building structure where the various physical items exist. I'm after some ideas on the data structure, I have a few different structures in mind but the all have downfalls or complexity. SteveJ
In DB you can design tree as the following:
NodesTable(NodeID,NodeName,NodeParrent) NodeTable.NodeParrent 1===M NodeTable.NodeID
and in ASP.NET use an DataReader to read all records of the table one by one and add them to the Tree datastructure you've designed.