Sobes.tech
Junior — Middle+

Level-wise node storage strategy in a database

livecode

Task condition

There is a hierarchical structure of elements represented as a tree: A /
B C / \ /
D E F G
H It is necessary to develop a scheme for representing such elements in a relational database and provide an example of table definition. The scheme should take into account the requirement of being able to select all records belonging to the same hierarchy level (for example, level 1 — elements B and C).