This is an example of a representation of a binary tree in an SQL table:
A node | parent
/ \ A | NULL
/ \ B | A
/ \ C | A
B C D | B
| / \ E | C
| / \ F | C
D E F
As you can see the table tree has two columns: node which is a primary key, and parent which is foreign key. In each node is stored a reference to its parent node. I want to define the same tree but this time using children, each node should reference its children instead. Any idea on how this can be done?