Until then we approached 3 ways to manage hierarchical data in MySQL : adjacency, nested set and path enumeration. There remains one method which will be covered in this article, closure table, called adjacency relation too.
Previously we saw that they are already two methods, adjacency list and nested set model, to manage hierarchical data in RDBMS. But it's not all. A third method, called path enumeration, permits to handle trees on relational database too.
Another way to manipulate hierarchical data in MySQL are nested sets. This approach uses an interesting technique to represent hierarchies of data.
Unlike XML files, RDBMS (relation database management system) are the flat and non hierarchical structures. So, the developer has to make a supplementary effort to transform database data into tree structures. With this article, we inaugurate the set of articles dedicated to managing hierarchical data in RDBMS. For our example, we will use the most famous system, MySQL.