OpenForum comes with a JDBC API as standard. Access for any RDB that has a JDBC driver can be configured. As an example, integration of the free open source database HQSQL is included.
Drivers for other popular databases can be found on the google code project page.
Using the API you can execute SQL from within server side Javascript using a simple set of methods.
To get an instance of the API call the getApi method like this:
db makes available the following methods:
/OpenForum/JarManager/JDBC/HQSQL has an example of accessing a database and displaying the result of a search. The server side javascript is held in a file get.sjs attached to the page /OpenForum/JarManager/JDBC/HQSQL/Action and is as follows:
SQL queries return there results as Xml in the followning format:
OpenForum has an Xml API for working with Xml elements which is documented here