4-4 Oracle Fusion Middleware Users Guide for mod_plsql
4.3.1 PLSQL Based Web Application Development Considerations and Programming Tips
PLSQL Gateway users should consider the following topics when developing PLSQL based Web applications:
1. Manage the use of Database Access Descriptors DADs
Try to restrict the number of DADs that each Oracle HTTP Server node uses.
2. Use of Nested Tables
PLSQL provides the ability to create tables. To build PLSQL tables, you build a table that gives the datatype of the table, as well as the index of the table. The
index of the table is the binary integer ranging from -2147483647 to +2147483647. This table index option is known as sparsity, and allows meaningful index
numbers such as customer numbers, employee number, or other useful index keys. Use PLSQL tables to process large amounts of data.
PLSQL provides TABLE and VARRAY variable size array collection types. The TABLE collection type is called a nested table. Nested tables are unlimited in size
and can be sparse, which means that elements within the nested table can be deleted using the DELETE procedure. Variable size arrays have a maximum size
and maintain their order and subscript when stored in the database. Nested table data is stored in a system table that is associated with the nested table. Variable
size arrays are suited for batch operations in which the application processes the data in batch array style. Nested tables make for efficient queries by storing the
nested table in a storage table, where each element maps to a row in the storage table.
3. Use procedure naming overloading with caution
PLSQL based Web applications should use the procedure name overloading feature with caution. It is best if procedure name overloading is avoided by having
multiple procedures with different names.
4. Consider rewriting applications where there is significant overhead in
determining the type parameters PLSQL based Web applications should be aware of the overhead in trying to
execute procedures where the URL does not provide enough details to know about the type of the parameter, such as scalar or array. In such cases, the first
attempt to execute a procedure fails and the procedure signature needs to be described before it can be executed by mod_plsql.
5. Use procedures with 2-parameter style flexible parameter passing