Attaching a Stored Procedure to a Table

You can attach a stored procedure to a table when your current DBMS supports stored procedures. This feature lets you update the table or retrieve information from this table.

For example, the stored procedure TABLE_ADDROW can be attached to a table in which you need to insert rows.

When you generate an OOM from a PDM, the procedures attached to a table become operations with the <<procedure>> stereotype in the generated class. By attaching procedures to tables, you are able to define class operations in the generated OOM.

When you generate a PDM from an OOM, class operations with the <<procedure>> stereotype become stored procedures attached to the generated table. The operation body is generated as a comment in the procedure definition.

You can attach a table to a procedure from the property sheet of a procedure or the property sheet of a table.

  1. Open the table property sheet and click the Procedures.
  2. Click the Add Objects tool to open a selection box, choose the the stored procedure you want to attach to the table and click OK.

    The stored procedure is displayed in the list of stored procedures.



  3. Click OK.