There are a number of aspects to consider in this system. Firstly, we have two tables. The Types table is the heart of the system, and the table is where we store the data related to the table.
The types have a manually written unique identifier, which allows us to understand the hierarchy without having to perform costly rollback operations. This is useful in the types table since it will be modified infrequently, thus avoiding unnecessary calculations and making the system much more efficient.
This allows us to perform filtering operations like the following, thanks to the seed that we propagate.
In this case, we are going to filter out items that are not archived (230) and at the same time those that belong to the type 'person' (110). We avoid closing the parenthesis to also capture the subtypes within 'person'.
In the Archivador, however, the ID is not generated manually; it is autogenerated. We calculate the Seed based on the IDs of the types it contains (220...) and the autogenerated IDs of the Archivador.
Although it sounds complicated, this allows us to create hierarchical filters. This enables viewing all the content at a glance in a tree structure.
I recommend continuing with ¿How to register data into the Archive?