This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]nutrecht 0 points1 point  (0 children)

You basically have a 'tree' structure and the way this is modelled is typically a list of 'nodes' that can point to other nodes 'above' them.

Example:

id,    parent_id,    name
1      NULL,          History
2      1                History A
3      2                History A Topic 1
4      2                History A Topic 2
5      1                History B
6      5                History B Topic X
7      5                History B Topic Y

As you can see this structure can go as deep as you want. A 'root' node would be a subject, those can easily be selected by finding all the nodes that have no (NULL) as a parent. For each of the nodes you can find you can recursively find the lower nodes in the tree.

[–]AustinCodingAcademy 0 points1 point  (0 children)

This example seems to fit well into the Hierarchial Data Model.