1. A computer-readable storage medium containing a program which, when executed, performs operations, comprising: receiving, from a requesting entity, a physical query composed in a query language used to query a physical database; generating, from the physical query, an intermediate representation of the physical query that indicates (i) data sources within the physical database containing data queried by the physical query, (ii) any conditions specified by the physical query on the data queried and (iii) relationships between the data sources queried by the physical query; and generating, from the intermediate representation, an abstract query composed from a plurality of logical fields, wherein each logical field specifies (i) a name used to identify the logical field, and (ii) a reference to an access method selected from at least two different access method types, wherein each of the different access methods types defines a different manner of exposing the data corresponding to the name of the logical field.
1. A computer-readable storage medium containing a program which, when executed, performs operations, comprising: receiving, from a requesting entity, a physical query composed in a query language used to query a physical database; generating, from the physical query, an intermediate representation of the physical query that indicates (i) data sources within the physical database containing data queried by the physical query, (ii) any conditions specified by the physical query on the data queried and (iii) relationships between the data sources queried by the physical query; and generating, from the intermediate representation, an abstract query composed from a plurality of logical fields, wherein each logical field specifies (i) a name used to identify the logical field, and (ii) a reference to an access method selected from at least two different access method types, wherein each of the different access methods types defines a different manner of exposing the data corresponding to the name of the logical field. 2. The computer-readable storage medium of claim 1 , further comprising, returning the abstract query to the requesting entity, and providing an indication of whether any data source queried by the physical query could not be used to generate a corresponding portion of the abstract query.