Vous êtes sur la page 1sur 1

Encapsulation : -The process of combining elements to create a new entity.

-inclusion of one thing within another thing so that the included thing is not a pparent. Stored Procedure : A stored procedure is a compiled SQLProgram, consisting of one or more SQL state ments, which resides and runs on the target database Benefits from Stored Procedure : - They encapsulte code. The database operation appears once, in the stored proce dure and not multiple times throughout the application source. This improves the debugging and maintainability - if there is any changes in database schema, then we have to make changes only in a sinle place i.e. Stored Procedure. So this becomes a single administrative task rather than code revision - Since all stored procedure resides on server, you can set tighter security res triction - Because stored procedure are compiled and stored outside the client applicatio n, they can use more sensitive varibales within SQL syntax, such as password or personal data -Using Stored procedure reduces network traffic Restriction for using a stored procedure - can only be created using Universe design tool. Information design Tool will n ot allow - No joins can be made between a stored procedure and a table in a universe - No query filters can be used - No pre-defined conditions - The procedure itself may contain a variable that will prompt, but it can not b e manipulated - They can not be used in Linked Universes - Not all databases support stored Procedures - SQL commands which are not allowed : Compute, Print, Output or Status - Stored procedures do not support OUT or dynamic result sets parameters - we can not use IF statement in where clause - You can only create a new universe based on stored procedure. You can not add it to an existing universe. - Stored procedure created all objects in universe automatically. If there is a long text object it will not generate an object. - If a change is made on the database to stored procedure. The universe view wil l not update the schema. The stored procedure must be re-inserted. (this causes Object id to change - In order to avoid parsing errors on stored procedure columns, it is recommende d that you alias result columns based on complex SQL, for example using the aggr egate functions - sum, count - The creation of aliased objects can not be constrained.

Supported parameters in a Stored procedure - Without parameters - With Parameters (IN) - With multi-result sets (this means it creates more than one virtual table by u se of the select statement)

Vous aimerez peut-être aussi