There is a database with information about network nodes. Some nodes have child nodes, and those in turn may still have children.
A table with all network nodes displayed looks like this:
In the first column, the node itself, in the second, its child node.
It is necessary to make it so that when you click on the main node, the tree of its child nodes opens, and if the children also have children, then when you click on them, more trees will open.
The database looks like this:
That is, a single node can have many children.
Please help me with advice and direction, where to start and how to implement it correctly in general.

