How to create a dynamic tree menu with CRUD operations?

Hi all,
I want to create a tree menu, by collecting the data from database tables…

And allows drag and drop, add, modify operations on it.
Then the modified tree structure is updated to the database tables…

Can you give me the idea to implement it with an example…

Thanking you…

If i make changes in the Product Categories, based on changes that related Products also move/update with the new category.
Can any one help regarding this…

Thanking you…