packagesinoracleplsql

                                                 Packages in Oracle Pl/Sql

What is Packages?

      The collection of Procedures, variables, functions, cursors and types etc. is called packages.

      The related Procedures and functions are grouped in to single unit is called package.

      Ex of package: The banking sector has multiple divisions such as Credit card, Personal loan, 
                                 Home loan, Car loan, Insurance etc...

Benefits of creating packages?

      a> It is easy to manage. If any changes required to make in Credit card function then no need to
           alter other divisions. Changes in Credit card division is alone fine.

     b> It supports overloading. In package, we can define one or more procedures or functions in
          same name with different parameters.

     c> Package supports ID. By default procedures and functions is public so that anyone can be
          accessed anywhere.
          Inside the package, we can make some procedures and functions as public or private.
          Public members can be accessed from anywhere but private members can be accessed within
          the package.

     d> It improves performance. For ex. If first time we call pgm A procedure inside a package the whole package will be loaded in to memory. In next time if we are calling another member

Comments

Popular posts from this blog

Decode function in Oracle pl/sql

SUBSTR function in Oracle pl/sql 

StoredprocedureinOracleplsql