Hi Guys
Thanks for the replies and consideration for reading my question.
I currently already have a structure for a single category settings, pretty easy I know. I was thinking of taking a slightly simpler route (I think it is simpler route but might be wrong).
I am currently thinking of adding an extra column in the categories table called children_ids. So that all the parents will keep a record of there children rather than the other way around. I children_ids column can be of Text type and ids could be stored in a string format i.e. 1-4-5-7-8 etc. and once I get this column from the DB I can split the string with '-' and get all the ids for its children.
I think this way it will be slightly easier for me to keep an eye on all the population ;), just ask the parent about their children. I think it will also ease the dependency serches as well because I will only need to get a list of all the children (all levels below recursively) quicker I guess. This way I can also sort all the entires before loading them up from the DB, another headache gone.
I am sure there has to be better solutions out there, but don't know if it would be easier or not.
My other requirement was to create a dropdown combobox with this category child-parent style, similar to the folder list structure for the users to choose through them. Maybe something like CodeProject example or CodeGuru example, I might use either one of the approaches for make my life a little easier.
Th problem is I would like to add more details within each record of the dropdown menu i.e. cat_id etc but dont want them to be visible to the user, this is to get details on the user selections. I guess I will have to compensate it by haveing a seperate ArrayList maybe with all the details of the categories and then just go to its index location once the user selected a record from the dropdown list. Am I thinking straight?
Thanks for reading and for the replies!