a data structure representative of a tree data structure or tree structured directed graph 34 as will be described in more detail below with reference to fig4 to 6 at step 36 an algorithm is used to identify and discard superfluous data tags and produce a data structure representative of an optimised directed graph 38 as will be described below with reference to fig7 and 8 the optimised directed graph 38 is compacted by the processes of steps 40 and 44 at step 40 weight values are assigned as will be described with reference to fig9 at step 44 the weight values are used to identify and reduce redundant key data to produce a data structure representative of a compacted directed graph 46 as will be described with reference to fig1 to 16 at step 48 the optimised and compacted directed graph 46 is stored as a final database 50 in a data storage format that will be described with reference to fig1 when the system requires to know the category data tag associated with a key the key data is read by the system and the database 50 is searched at step 54 to rapidly retrieve the required data tag 56 fig3 illustrates a data set to be used as an example for describing the processes that make up.