Today an interesting article about how represents hierarchical data in a relational database.
http://fungus.teststation.com/~jon/treehandling/TreeHandling.htm
Interesting this concept : |
Every node must have a node identify and a "Child of" identify. So the key of every object is formed by two keys :
- ID_NODE
- CHILD_OF
For example (represents image above) :
ID_NODE CHILD_OF
| |
1
|
1
|
2
|
1
|
3
|
1
|
4
|
2
|
5
|
3
|
6
|
5
|
Stay tuned.