A method and apparatus, and article of manufacture are provided to process
an abstract query of a database abstraction constructed over an
underlying physical data storage mechanism. The database may comprise a
single data source, or a federated source spanning multiple systems.
Embodiments of the invention process an abstract query by generating an
intermediate representation of the abstract query. In one embodiment, the
intermediate representation comprises an abstract query plan. An abstract
query plan includes a combination of elements from the data abstraction
model and elements relating to the underlying physical data storage
mechanism. Once generated, a back-end component may easily traverse the
abstract query plan to generate an SQL statement (or other resolved
query) corresponding to the abstract query. Further, once constructed,
the abstract query plan provides a platform for many different
optimizations that may be selected by a user or by the runtime component
inspecting the abstract query plan prior to creating the resolved query.