This is a follow-up:
MySQL - Is it possible to get all the subitems in a hierarchy?
I have an arbitrary depth table with an adjacency table (I am at a point where I can convert it to a nested set model .
I read the MySQL data on how to use the nested set model, although it seemed to be becoming more and more complex and very difficult to perform basic functions such as insert, update and delete.
Another blog post shows how to use a trigger system with an adjacency list model to save an ancestor table that links each object to its ancestors.
Now I need to return a list of all the children of this node in order to change or delete them. This hierarchical structure will not change all the time after its creation, but there will be a massive number of hierarchical structures.
Three methods that I see:
Created a stored procedure that will execute a recursive query that returns all the children.
Convert to a nested set model that will require it to be complex and possibly create a stored procedure for adding, editing, and deleting in it.
Create the ancestor table described above for insert / delete triggers to process all data.
If there are other methods that I am not learning, let me know and I will update this list.