Representing hierarchical data in a relational database is easy. For instance, modelling the contents of a filesystem with directories and subdirectories is straightforward using self-joins on a parent key. The root node(s) are represented as those without a parent. Such a model is useful for modelling other types of data – in particular, hierarchies in […]