1. A computerized method for automatically generating queries for and retrieving data from a database management system (DBMS) wherein the data held in the DBMS is organized and maintained in related data structures and wherein the relationship and organization of the data structures is specified by a schema, and wherein the DBMS receives and executes queries written in a code of a query language, the method comprising: a) receiving a specification of a schema of a DBMS from which data is to be retrieved; b) receiving a specification of a structure for holding data retrieved from the DBMS; c) receiving a specification of the data sought to be retrieved from the DBMS; d) using the specification of the schema and the specification of data sought to be retrieved automatically generating query language code to carry out two or more queries of the DBMS which will retrieve the sought after data, a first one of the queries being a primary query for retrieving a first set of data, and a second one of the queries being a secondary query for retrieving a second set of data, the secondary query using data retrieved in the primary query to obtain the second set of data; e) automatically sending at least the first and second queries to the DBMS at different successive times and retrieving the associated data; and f) organizing at least some of the retrieved data into the specified structure for holding data retrieved from the DBMS.