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
Effects of NULL Operator As a general rule-but not a universal one-if NULL is an argument to an invocation of a system-defined read-only operator, then NULL is the result of t

Benefit of the dynamic SQL: This part shows you how to take full benefit of the dynamic SQL and how to keep away from some of the common pitfalls. Passing the Names of Sc

%ROWCOUNT When its cursor or cursor variable is opened, the %ROWCOUNT is zeroed. Before the first fetch, the %ROWCOUNT yields 0. Afterward, it yields the number of rows fetche

Project Description: We organize an online system called ACPAS we have created a project called EVO that can be use by our customers to integrate their web sites with the Acpas

The SQL ‘CREATE TABLE' scripts for all the tables you have implemented. Note that your tables must correspond exactly to the ERD you have provided in 1. above, or you will lose ma

Accessing Attributes: You can refer to an attribute only by its name not by its position in the object type. To access or modify the value of an attribute, you can use the dot

INSERT Statement The INSERT statement adds fresh rows of data to the specified database table or view. Syntax:

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

Exceptions An exception is the runtime error or warning condition that can be predefined or user-defined. The Predefined exceptions are raised implicitly through runtime system

THEO R Y OF CATASTROPHISM OR CATALYSM (CUVIER 1769-1832) - The world has passed thorugh several stages and at the end of each stage there was a catastrophe killing all the