1. A computer implemented method for querying program design models, comprising the steps of: obtaining a tree structure representation of a subject metamodel, the subject metamodel being formed of model elements, the tree structure representing model hierarchy of the model elements; obtaining a database representation of the model elements; mapping the tree structure representation to the database representation of the model elements by: translating the tree structure representation to the database representation, the translating of the tree structure representation maintaining metamodel semantics of the model elements from the tree structure representation to the database representation of the model elements, the database representation being an abstraction of the metamodel; forming a query statement corresponding to the tree structure representation and mapping said formed query statement to a computer implemented query statement corresponding to the database representation to search and retrieve certain model elements from the database representation; and using the mapped computer implemented query statement, arriving at the certain model elements of the subject metamodel; and outputting the certain model elements as query results.