We have an internal website and I would like to take all the information in our database and output it into a simple tree structure. I've had two ideas on how to do this, but was wondering which would prove to be the better method, or if there was a better way.
The first way was to add 1 additional field to the database named "sub_of" and simply put the ID of the item above it in the heirachy, and if it is the top level, it simply doesn't have a value for "sub_of". Secondly, I would need to add another field called "alias_of" and it would basically be the same as another database record (as far as name, information etc.) however it would be under a second category in the structure.
Example:
HR > Forms > 401K
Forms > HR > 401K
The second item would just alias the first one, so when I made a change to the entry for 401K (say changed the URL to the 401K form), it would automatically change all of it's aliases.
--------------------
The other way would be using a format such as:
HR::Forms
Departments:hone Number::Main Office
I'm not sure the benefits/disadvantages to each, but i'm just looking for some feedback on the best way to tackle this.
_______________
_brian.
The first way was to add 1 additional field to the database named "sub_of" and simply put the ID of the item above it in the heirachy, and if it is the top level, it simply doesn't have a value for "sub_of". Secondly, I would need to add another field called "alias_of" and it would basically be the same as another database record (as far as name, information etc.) however it would be under a second category in the structure.
Example:
HR > Forms > 401K
Forms > HR > 401K
The second item would just alias the first one, so when I made a change to the entry for 401K (say changed the URL to the 401K form), it would automatically change all of it's aliases.
--------------------
The other way would be using a format such as:
HR::Forms
Departments:hone Number::Main Office
I'm not sure the benefits/disadvantages to each, but i'm just looking for some feedback on the best way to tackle this.
_______________
_brian.