In order not to lose the advantages of a hierarchical structure and, at same time, to favor an improvement in the flexibility of the system, the best solution would be an integration of the hierarchical and the relational database accounting systems.
The first task is to determine which accounting database structure is the most suitable; the second is to find the most appropriate encoding scheme for managing data.
Given that the most recent literature shows that the relational structure
predominates in the database field, a solution has to be found for incorporating hierarchical data coding into the relational model.
One solution is to use a set of variants, able to extend the initial code representing the parent, through the use of multiple successive code blocks representing the children.
In this way, when an extended code is entered, it simultaneously
embeds all the distinctive characteristics of the data.
Table 1 depicts an extended code related to the previous example of Fig1.
Using this technique, the first element of the code, related to the ‘‘category,’’ is classified as 1 or 2, where 1 identifies the clients and 2 the suppliers category.
The second column of the table represents a sub specification of the first, for example where ‘‘ID_category’’ is 1 (or 2) and ‘‘ID_sub_category’’ is 01, the latter could identify a specific client (or supplier) category. The third column refers to an auto incremental code that allows the differentiation of categories and subcategories and the enumeration of the elements belonging to them.
The main advantage of this representation relates to the higher selectivity
arising from the rigidity of the structure.