Query for updating a node in hierarchial tree structure
A tree structure or tree diagram is a way of representing the hierarchical nature of a structure in a graphical form.
It is named a "tree structure" because the classic representation resembles a tree, even though the chart is generally upside down compared to an actual tree, with the "root" at the top and the "leaves" at the bottom.
While XML handles hierarchical data quite well, relational SQL doesn't.
There are several different ways to model a hierarchical structure.
js Tree is jquery plugin, that provides interactive trees.
It is absolutely free, open source and distributed under the MIT license.
Also, "encyclopedia", as the root of the tree, is the ancestor of "science", "culture", "art" and "craft".
Finally, "science", "art" and "craft", as leaves, are ancestors of no other node.
Here's a method that's easy to understand and maintain, and gives you the full hierarchy (or any piece of it) very quickly and easily.It uses j Query's event system, so binding callbacks on various events in the tree is familiar and easy.Just a few of the features worth noting: js Tree needs a specific format to work with JSON.js Tree is easily extendable, themable and configurable, it supports HTML & JSON data sources and AJAX loading.
js Tree functions properly in either box-model (content-box or border-box), can be loaded as an AMD module, and has a built in mobile theme for responsive design, that can easily be customized.
The upside is, it's easy and it's normalized: the data means exactly what it says and there's no duplication.