This question got me thinking: should we apply the principle that \"flat is better than nested\" to data as well as to code? Even when there is a \"logical tree structure\" to t
This question can't be answered "in general" - there is no right answer.
For this particular example, I actually like the tree structure better. Without knowing anything about the original application, and just looking at the structure, the relationship between the items is obvious. With the flat structure, I have to read some documentation, or application code to "know" that your tuple of children refer to id's.
The tree structure is self-documenting - the flat structure isn't.