Showing posts with label PL/SQL. Show all posts
Showing posts with label PL/SQL. Show all posts

Thursday, December 21, 2017

Oracle  Database Function
( Create & Call )


In the name of Allah, Most Gracious, Most Merciful
Praise be to Allah, blessing and peace be upon our prophet Mohammed, his family and his companions. After that,


      This is just an example of  Oracle Database Function to show you how can we create and call it as an individual database function not related to any PL/SQL package. Later on, In shaa Allah, we will declare and implement it with it's related database functions in a new package called a trans_pkg. 
Now, let's start the current task definition.


Task Definition:   

      1- Get the maximum quantity for each item stored in a specific  storage area.
     2- Update its maximum quantity in  the transaction table. 


Oracle PL/SQL Package

Oracle PL/SQL Package

      In the name of Allah, Most Gracious, Most Merciful
Praise be to Allah, blessing and peace be upon our prophet Mohammed, his family and his companions. After that,


      It's really a good practice to relay on PL/SQL Packages. Oracle bundle related PL/SQL programming resources into PL/SQL Packages.
It comprises  all the database triggers, procedures, functions and  etc.


PL/SQL Packages Advantage :

1.     Modularity:  One package  for a specific module or function.
2.      Security:      Granting privileges enhance security.
3.     Better Performance:  Loading multiple objects into the memory at once helps in reducing the traffic and increasing the performance.


 Task Definition:   

    Create PL/SQL Package  to group all related database  functions expected to return the name or the descriptions of all lookup tables created within  your application.