Stored procedures are a named set of precompiled SQL statements that are stored on the server and are invoked from the client by a remote procedure call. Stored procedures are supported at the model level and for tables and views. For Oracle only, support is also provided for stored procedures for materialized views.
You can reverse engineer the code for a stored procedure or write a stored procedure. After you write stored procedures, you can attach them to individual tables, views, or to the model. You can create a stored procedure and include it in the schema generation script. When you generate a database schema, any template code expands in the stored procedure and is included in the CREATE PROCEDURE statement for each procedure attached to a table, view, or model. You can also drop previously defined stored procedures in the generated schema. You can execute a DROP statement for each CREATE procedure statement in the generated schema.
Some benefits of using stored procedures are as follows:
Note: CA ERwin Data Modeler does not support built-in stored procedure templates since there is no standard functionality provided by a stored procedure.
The order in which you add stored procedures to your model is important. The stored procedure code is generated according to the order the stored procedures display in the Stored Procedure Editor. You can change this order at any time by using the up and down arrow buttons on the Object Creation Order tab in the Stored Procedure Editor.
Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |