Stored Subprograms:
Subprograms can be compiled independently and stored permanently in Oracle databases that are ready to be executed. The subprogram explicitly CREATEd by using an Oracle tool is known as a stored subprogram. Once it compiled and stored in the data dictionary that is a schema object which can be referenced through any number of applications associated to that database.
Subprograms described within another subprogram or within a PL/SQL block are known as local subprograms. It cannot be referenced through other applications and exist only for the convenience of the enclosing block.
Stored subprograms offer better performance, higher productivity, application integrity, memory savings and tighter security. For instance, through designing applications around a library of stored procedures and functions, you can prevent redundant coding and increase productivity.
Every stored subprogram has a name and is known as or manipulated using the name in Oracle. A PL/SQL structure and the related rules are the similar when a subprogram is constructed using them. A Procedures and functions are known as subprograms. They can be known as inside triggers also.
Oracle has a concept through that all the associated subprograms alongwith the variables and arrays can be packaged for defining and deploying an application. These are known as packages.