Advantages of subprograms, PL-SQL Programming

Advantages of Subprograms

The Subprograms give extensibility; that is, tailor the PL/SQL language to suit your requirements. For illustration, if you require a procedure which creates new departments, you can easily write one, as shown below:

PROCEDURE create_dept (new_dname VARCHAR2, new_loc VARCHAR2) IS

BEGIN

INSERT INTO dept

VALUES (deptno_seq.NEXTVAL, new_dname, new_loc);

END create_dept;

The Subprograms also give modularity; that is, they break a program down into controllable, well-defined logic modules. This supports the top-down design and the stepwise refinement approach to solving a problem.

In addition, the subprograms promote reusability and maintainability. A subprogram can be used once validated with the confidence in any number of applications. When its definition changes only the subprogram is affected. These simplify the maintenance and enhancement.

At last, the subprograms aid abstraction, the mental division from particulars. To use the subprograms, you should know what they do, not how they work. And hence, you can design the applications from the top down without worrying about the implementation details. The Dummy subprograms (stubs) permit you to defer the definition of procedures and functions until you test and debug the major program.

Posted Date: 10/5/2012 5:22:02 AM | Location : United States







Related Discussions:- Advantages of subprograms, Assignment Help, Ask Question on Advantages of subprograms, Get Answer, Expert's Help, Advantages of subprograms Discussions

Write discussion on Advantages of subprograms
Your posts are moderated
Related Questions
Primary Key - SQL A PRIMARY KEY specification carries an implicit NOT NULL constraint on each column of the specified key. When more than one key constraint is required, the k

Data Types in SQL SQL's concept does not differ significantly from that defined in the theory book, apart from that business concerning NULL. However, the theory book equates

PITS Depressions in secondary cell wall is called pit. A pit present on the free cell wall surface without its partner is called Blind pit. It consists of 2 parts -

Assignment Statement: The assignment statement sets the present value of the variable, parameter, field, or element. The statement consists of an assignment target followed by

Need Azure CRM Web Application with two-factor authentication We presently have a CRM-like database stored on MS Azure that we presently access over an MS Access application. It

Comparison Operators Usually, you use the comparison operators in the WHERE clause of a data manipulation statement to form the predicates, that compare one expression to anot

Positional Notation The first procedure call uses the positional notation. The PL/SQL compiler relates the first actual parameter, account, with the first proper parameter, ac

Using COMMIT The COMMIT statements end the present transaction and make permanent any changes made during that transaction. Till you commit the changes, other users cannot acc

Advantages of Exceptions Using the exceptions for the error handling has many benefits. Without an exception handling, every time you issue a command, you should ensure for th

Expressions   An expression is a randomly complex combination of the constants, variables, literals, operators, & function calls. The simplest expression is the single variabl