The present invention provides methods and systems for accessing a
database with a database-enabled messaging facility. An application on a
front-end server may access a database located on a back-end server via
the database-enabled messaging facility. In general, the database-enabled
messaging facility receives a message containing a database request from
the front-end server, parses the message to extract the database request,
submits the database request to the database, receives results from the
database request and sends a message containing results from the database
request to the front-end server. For some embodiments, the messaging
facility may optimize-accessing the database by changing database
requests-prior to submitting them to the database. For example, the
messaging facility may reorder database requests, delete redundant
database requests, or combine database requests to minimize a total
number of database accesses.