IBM® WebSphere® Portlet Factory provides a variety of database tools from high-level to low-level.
These tools allow you to connect to and interact with a database. In terms of functionality, the tools can be described as follows:
Relational Database New Model wizard
A wizard that walks you through the steps required to build a model that contains all the builders necessary to retrieve, create, update, edit, and delete database entries. This wizard provides the best solution for most general database tasks and will also construct an SQL query and set up page displays for the data.SQL Call builder
Use this builder if you need to run an SQL statement or stored procedure on a database. In addition to providing basic connectivity, this builder includes a database explorer that will assist you in constructing an SQL query. This builder also provides settings that allow you to control the formatting and translation of a returned result set.SQL Family of builders
These builders provide the core functionality required to access and use a database installed on a local or remote application server. The SQL builders interact with a database through a Java Naming and Directory Interface (JNDI) datasource on the application server. The application server manages all aspects of database connections (for example, pooling, credentials, or time outs).
Configuring a sample datasource
We provide a sample datasource and database pre-configured on the IBM WebSphere Application Server Community Edition (WAS CE) we distribute. You can configure this database and datasource on your own WebSphere Application Server Community Edition or your IBM WebSphere Application Server server.
Building an SQL statement
You can use the SQL Call builder to work with SQL statements.
Adding an SQL Call builder to an existing model
Use the SQL Call builder to establish a database connection and retrieve data.
Creating a relational database model
Use the New Model
wizard to build a relational database model.
Displaying result sets from Oracle stored procedures
Oracle stored procedures return a REF_CURSOR object from which the results of the stored procedure may be made available to IBM WebSphere Portlet Factory builders.
Working with a prepared SQL statement
The SQL Statement builder provides more basic functionality than the SQL Call builder. The SQL Statement builder is designed to work with a prepared or callable SQL statement that is ready for execution.
Implementing a database transaction
Follow these steps to implement a database transaction.
Setting up caching for a database query
Use the Cache Control builder to set up caching for a database query.
Transforming statement results with the SQL statement builder
The SQL Statement builder provides settings that allow for special-handling of columns via method-driven transforms. For example, you can use this feature to transform an output parameter to a record set.
Parent topic: Developing Web applications with IBM WebSphere Portlet Factory