what is stored procedure in dbms

what is stored procedure in dbms

1 year ago 56
Nature

A stored procedure is a group of SQL statements that are stored together in a database management system (DBMS) as a group, so it can be reused and executed multiple times. It is a subroutine or a subprogram in the common computing language that has been created and stored in the database. Stored procedures can be used to perform one or more DML operations on a database, generate reports, and perform complex calculations. They can accept input parameters and return multiple values of output parameters. Stored procedures provide an important layer of security between the user interface and the database, support security through data access controls, and preserve data integrity because information is entered in a consistent manner. They improve productivity because statements in a stored procedure only must be written once. Stored procedures offer advantages over embedding queries in a graphical user interface (GUI) because they are modular, easier to troubleshoot when a problem arises in an application, and tunable, which eliminates the need to modify the GUI source code to improve its performance. Use of stored procedures can reduce network traffic between clients and servers because the commands are executed as a single batch of code. Stored procedures are pre-compiled and stored on the server, so they can be executed more quickly than SQL statements that are sent from client applications. Stored procedures can be called from different client applications, which means that the same code can be reused across different applications, reducing development time and maintenance costs.

Read Entire Article