4. The computer-readable storage medium of claim 1 , wherein generating an intermediate representation of the physical query, comprises: resolving any indirect references to the physical database included in the physical query; dividing the physical query into a set of regions, and for each region creating an abstract query plan fragment corresponding to the region, wherein each abstract query plan fragment includes a set of one or more table instances, wherein each table instance includes: (i) a table from the physical database, wherein the table is referenced by the corresponding region of the physical query; (ii) an indication of the columns, in the table, that are referenced by the corresponding region of the physical query; and (iii) any conditions specified by the physical query that are applied against the tables and columns for the corresponding region; and joining the created abstract query plan fragments together to form an abstract query plan, wherein the fragments are joined according to relationships between tables in the physical database.
4. The computer-readable storage medium of claim 1 , wherein generating an intermediate representation of the physical query, comprises: resolving any indirect references to the physical database included in the physical query; dividing the physical query into a set of regions, and for each region creating an abstract query plan fragment corresponding to the region, wherein each abstract query plan fragment includes a set of one or more table instances, wherein each table instance includes: (i) a table from the physical database, wherein the table is referenced by the corresponding region of the physical query; (ii) an indication of the columns, in the table, that are referenced by the corresponding region of the physical query; and (iii) any conditions specified by the physical query that are applied against the tables and columns for the corresponding region; and joining the created abstract query plan fragments together to form an abstract query plan, wherein the fragments are joined according to relationships between tables in the physical database. 7. The computer-readable storage medium of claim 4 , wherein generating an abstract query comprises: identifying each table in the abstract query plan that includes at least one of (i) an output column of data in the physical database selected for output and (ii) a column of data specified in a condition included in the abstract query plan; matching the at least one column of data to a logical field with an access method that maps the logical field to the at least one column of data and including the matching logical field in a results section of the abstract query; and identifying each condition in the abstract query plan evaluated in reference to a column in the physical database, and (i) matching the column with the access method provided for a logical field that maps to the column and (ii) including the logical field in a condition section of the abstract query.