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
Example of DELETE - SQL As with UPDATE, a FOR PORTION OF clause can be specified if the target table has a defined period name, as illustrated in Example. Example: Deleting

Using INNER JOIN INNER JOIN is used to retrieve the data from all tables listed based on a condition of equality listed after keyword ON. If the condition is not meet, rows ar

Implicit Rollbacks Before execute the INSERT, UPDATE, or DELETE statement, the Oracle marks an implicit savepoint . When the statement fails, the Oracle rolls back to the save

UNNEST operator in SQL The inverse operator of GROUP is UNGROUP. SQL has an operator, UNNEST, that can be used for similar purposes, but its method of invocation is somewhat p

Updating Tables in SQL The topic of updating by describing the assignment operator, ":=" in Tutorial D. SQL uses a different syntax for assignment, using the key word SET and

Overview of control structures According to the structure theorem, any computer program can be written by using the basic control structures as shown in figure below. They can b

write the program for traffic control system with 10 second, 15 secod, and 20 second delay

Literals A literal is an explicit numeric, string, character, or Boolean value not represented by an identifier. Numeric literal 147 and the Boolean literal FALSE are some of

THEO R Y OF SPECIAL CREATION - Life originated on the earth due to natural events by the super natural power. The biblical story of creation of world within six days was p

Naming Conventions The similar naming conventions apply to all PL/SQL program items and units including the variables, cursors, constants, cursor variables, procedures, exception