Portlet Factory, Version 6.1.2
Working with a database
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).
Parent topic: Developing Web applications
- 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.
- Connecting to a database
There are several ways you can establish a connection to a JNDI datasource installed and running on an application server.
- Building an SQL statement
You can use the SQL Call builder to work with SQL statements.
- Execution of an SQL statement
The SQL Transaction builder chains together other SQL builders in the model to create a transaction sequence.
- Caching query results
The Cache Control builder is the tool you use to cache the results of a database query.
- Initiate a transaction and display the results
A transaction is a combination of database related activities that culminates in the display of data returned from a database by a query.
- Optimization of database operations
There are several techniques you can use to optimize your database operations.
- About adding an SQL Datasource builder to an existing model
Use this approach to add basic database connectivity to a model.
- Cache Control builder
The Cache Control builder allows you to cache the output of a specific action within a model.
- Server statistics and performance analysis
Use the statistics described in this topic to analyze the performance of your IBM WebSphere Portlet Factory application.
- 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.
- The SQL Builders
The SQL builders are used to implement database operations.
Library | Support |