1. An apparatus for transforming an unstructured database, wherein the apparatus transforms the unstructured database into a structured database, the apparatus comprising: a memory; a computing processor; and a module stored in the memory, said module comprising instruction code executable by one or more computing processors, and configured to cause the one or more computing processors to: import an unstructured database into a computing device system, the unstructured database comprising a plurality of entities in a hierarchy of levels below a highest level; analyze the unstructured database to identify relationships between the entities in the hierarchy; generate a flattened database by expanding entities from higher levels into lower levels of the database such that every entity is present in a lowest level at least once; determine one or more instances of unbalanced or ragged hierarchies in the unstructured database, wherein: an unbalanced hierarchy is a hierarchy having branches of unequal length, and a ragged hierarchy is a hierarchy where at least one entity below the highest level does not have a direct supervisor; populate the flattened database according to one or more predetermined rules in order to develop relationships between the one or more instance of the unbalanced or ragged hierarchies and the remaining entities in the hierarchy; and provide an output of a structured database comprising the populated hierarchy.