1. A method for executing database insert calls in a MES system, wherein data to be stored into a database are represented in XML tree formats according to a S95 hierarchy model in which each XML tree node is representing a specific S95 entity, which method comprises the steps of: a) receiving as an input a given XML tree corresponding to given S95 hierarchy data to be stored into the database; b) processing the given XML tree for generating a corresponding parallel structure, the processing step including the following sub-steps: b1) grouping all tree nodes according to their MES type into a set of entity types; b2) storing, for each entity type, a set of references pointing to each tree node of an entity type; b3) generating the parallel structure corresponding to the given XML tree by storing the set of entity types and corresponding sets of node references; c) getting a given S95 entity type and the corresponding set of node references from the parallel structure; d) for the given S95 entity type, determining that the corresponding set of node references is not empty, composing a database insert call passing information of the given set of node references; e) for the given S95 entity type, determining that the corresponding set of node references is not empty, executing the database insert call of step d); and f) executing steps c) to e) for all the S95 entity types of the parallel structure.