Re: Stored Procedure VS Package
Date: Wed, 07 Apr 1999 17:47:23 GMT
Message-ID: <370B9A29.7C3D537E_at_nospam.flash.net>
Not even close. A package is a collection of public and private functions,
procedures, and data
elements. Like a procedure, a package is loaded into memory at one time.
The advantage with
a package is that if you have a procedure that calls internal or private
functions/procedures
etc. within the package, the package is already loaded into memory and
therefore the calls get
executed faster.
Another advantage is dependencies. If you change the code in a procedure
and reload it into
the database, all objects depending on that procedure are invalidated.
With a package, you
can decouple the specification for the public items and the actual code.
You may then load
the actual code without changing the specification and no dependent object
become invalid.
This can be a tremendous time saver.
Finally, by grouping functions and procedures into packages, you cut down
on the number
of objects you see in a given schema. For example, if you have 100
functions and procedures
all 100 of them will be listed if they are in stand alone functions and
procedures. If they are
grouped in packages, you may cut that by a factor of 10.
We could go on about data hiding and other positive concepts that are made
much easier in
packages but I'm sure I am beginning to bore you by now.
yewpc_at_my-dejanews.com wrote:
> The main different between Stored Procedures and Packages is
> Stored procedure will return all the selected records to the calling
> program in once but Package will return the selected records,
> record by record to the calling program.(calling in a loop).
> AM I right ?
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Loyal Barber
BLT Soft Incorporated
-- The difference between Windows 95 and 98? 3!Received on Wed Apr 07 1999 - 19:47:23 CEST