Home » Developer & Programmer » Forms » Database Procedure vs Oracle Program Units Procedure vs Library Procedures (Oracle Forms 10g, Windows)
Database Procedure vs Oracle Program Units Procedure vs Library Procedures [message #654048] Tue, 26 July 2016 06:41 Go to next message
Sandeepsm
Messages: 7
Registered: July 2016
Location: Greeny Kerala
Junior Member
HI all,
I would like to know the advantages & disadvantages of writing a procedure in oracle forms program units against writing procedures in Oracle database. Also please clarify on using library procedures against database procedures.





Thanks&Regards
Sandy

--Every Accomplishment Starts With The Decision To TRY.
Re: Database Procedure vs Oracle Program Units Procedure vs Library Procedures [message #654051 is a reply to message #654048] Tue, 26 July 2016 07:11 Go to previous messageGo to next message
John Watson
Messages: 8399
Registered: January 2010
Location: Global Village
Senior Member
Welcome to the forum. Please read our OraFAQ Forum Guide and How to use [code] tags and make your code easier to read

The developer types here may give you different advice, but this is mine, from the DBA's point of view. Code stored in a form is submitted to the database as an anonymous pl/sql block. I hate programmers whop use anonynmous blocks! They stress the database, perform badly, have security implications, no source code control, and worst of all I can't see the code. Use stored program units instead.
Re: Database Procedure vs Oracle Program Units Procedure vs Library Procedures [message #654052 is a reply to message #654051] Tue, 26 July 2016 07:16 Go to previous messageGo to next message
cookiemonster
Messages: 13895
Registered: September 2008
Location: Rainy Manchester
Senior Member
If the procedure is primarily to use form built-ins then put it in the form, unless you want to do the same thing in multiple forms, in which case you should put it in a library.
If it's primarily doing PL/SQL and SQL then it should go in the DB.
If it's a mix try and split it into a DB part and a forms part.
Re: Database Procedure vs Oracle Program Units Procedure vs Library Procedures [message #654197 is a reply to message #654052] Thu, 28 July 2016 03:45 Go to previous messageGo to next message
Sandeepsm
Messages: 7
Registered: July 2016
Location: Greeny Kerala
Junior Member
Thanks John, cookiemonster for the reply. I am new to this Oracle Forms. Don't take me wrong if i ask , if we can achieve the functionality using Database procedure, then why do we need library functions, both can be accessed among different forms.


Thanks&Regards
Sandy

--Every Accomplishment Starts With The Decision To TRY.
Re: Database Procedure vs Oracle Program Units Procedure vs Library Procedures [message #654209 is a reply to message #654197] Thu, 28 July 2016 05:25 Go to previous messageGo to next message
cookiemonster
Messages: 13895
Registered: September 2008
Location: Rainy Manchester
Senior Member
Because sometimes there is common forms functionality that can't be done by the DB. Anything that affects the appearance of forms for example.
Re: Database Procedure vs Oracle Program Units Procedure vs Library Procedures [message #654266 is a reply to message #654209] Thu, 28 July 2016 23:37 Go to previous message
Sandeepsm
Messages: 7
Registered: July 2016
Location: Greeny Kerala
Junior Member
Thanks a lot cookiemonster..



Thanks&Regards
Sandy

--Every Accomplishment Starts With The Decision To TRY.
Previous Topic: ORA-04062
Next Topic: HDD ID- Oracle Commands
Goto Forum:
  


Current Time: Tue Oct 27 01:40:24 CDT 2020