The invention provides a set of enhancements to the EJB Query Language ("EJB
QL") for providing ResultSets using EJB QL and to efficiently access databases
using ejbSelect methods within Enterprise Java Beans. Particularly, these EJBQL
language extensions allow for the selection and retrieval of ResultSets. Since
the use of the invention is expressed in terms of object relational constructs
defined in an EJB deployment, it allows for the efficient retrieval of data from
a Database expressed in terms of the relationships defined in that EJB deployment.